I think it’s maybe if I drag my finger to the edge of the screen. something with the touchcancel listener?
experience is that everything works perfectly otherwise. if I place the last wall then the ghost disappears but if I then remove one the ghost comes back. i.e. it disappears iff 0 walls remain