Fixes #4209: Prevents removal of all paths from the page when environmen...

...ts are deleted.