Many systems just copy your implementation. Furthermore, there are three pure R7RS constructs that are problematic when identifiers are textually replaced:
(1) Quotation of identifiers. This can actually be solved by making sure that the replacing identifier has the same symbolic name, which can be achieved by some more syntax-rules magic.
Good point, I might do this.
(2) include and include-ci are standard R7RS forms that will break the technique.
True, though again stretching the imagination to suggest that someone might want to include a file with expressions referring to a locally bound match variable.
(3) Literals with cycles, which are allowed by R7RS will break any textual scanner.
These are only allowed directly in quote and can therefore be avoided when walking.