Fix issue with initial scale when opening a new file and another one is already loaded

Fixes #3534.