Fixes #4209: Prevents removal of all paths from the page when environments are deleted.