Fix crash when moving a cleared vector layer