Fixed bug where sweeping could sometimes remove a layers that shouldn't have been removed.