Fixed NameAutomata to handle escaped characters

I should put a more direct test in; i.e. the one at the moment relies on
turning off UseHashWhenMatchingMembers, but if that internal code was
changed then this isn't a strong guarentee that the Automata code path
is run.