Fixes #1367, scrolling is not removed if modals already visible