Preserve some values for nested postloops

Applies to https://github.com/GigaOM/legacy-pro/issues/3276

If post loops are nested, they can overwrite values in the singleton - wrecking the cached post ids for the parent loop.

This allows preservation of those values so that cached post ids are connected to the correct post loop.