get-buffer-window returns nil when it shouldn't?