For #2 - Parse backrefs properly.

Remove sentinel (\0) pairs before checking for \0\d since \0\0 is
really "\\" (with the way we're parsing).