Alright, you ready for this! This has been the fix for After Effects running out of ram while rendering the final project out and now that I ran into this 2 or more frames error I double check the settings and sure enough it was off. For some reason Adobe thought it would be funny to make a very pertinent setting hidden, so do the following and it should clear things up.
Edit – Preferences
Before clicking on an option hold the SHIFT key, while holding the SHIFT key click on any option, ie General. You must keep holding the SHIFT key till the menu opens.
At the bottom you will find the SECRET settings.
Check – Disable Layer Cache, and I put 15 in for Purge Every _ Frame
This has helped a massive amount of people I know and saved many projects from being late.
Hope it works for you.
Aaron