Record frame history in the correct place

Fixes numerous issues with rendering tests.