Correct active page detection with DOM Cache

Fixes #262