Fixed some context menu re-registration errors.
Move tab retention to an ongoing process, instead of doing it after render.