Issue #1071 - Ensure that Documents always have a non-null Window.