Fixes offset drift caused by multiple macros in the same sub-macro replacement

This fixes https://github.com/enigma-dev/enigma-dev/issues/903

Basically, the _flatten() function (which is only called within an existing macro substitution) was failing to account for the fact that a macro's replacement text might have a different size than its original text. This would only affect the result if two macros existed inside another macro. While rare, it does happen from time to time.