regex: clean up position accounting for literal nodes

This should not change the meaning of the code, just make the intent
clearer: advancing position is tied to adding a new literal.
1 file changed