autobuild: Guard against view.window() being None. Affects #140