Better handling of avoiding double-rendering.

The new approach allows hidden elements to still render (which works
well for elements hidden that are revealed via JS later), but still
avoid double-rendering elements (if a page is save to the desktop then
re-opened). Not perfect by a long short though, but fixes immediate
issues.