Reverting the change that removes the observer for DOMTree.viewport, as well as adding my comment regarding the issue.
Use hopefully better method of handling number of instances.