fix issue 8203, similar issue with lookaround

When using a temporary engine as closure its generation counter
should be tracked separately for each lookaround.

For now just use built-in AA, later we could find better places
store put this counter in.

This is an important bugfix.