You've lost all the information in the entity table as to whether the entity should be consumed when the trailing semicolon is missing. That's important for proper parsing. As I noted before, parsing `"&aeligtest"` should emit `"ætest"` (as if it were `"&aelig;test"`) but `"&acytest"` should not act like `"&acy;test"` and instead should consume just the `&` (which I believe will end up emitting `"&acytest"`).