Fix crash when flattening container after moving
Fix crash when flattening container after moving

container_flatten removes the container from the tree (via
container_replace) before destroying it. When destroying, the recent
changes to handle_seat_node_destroy incorrectly assumes that the
container has a parent.

This adds a check for destroying a container which is no longer in the
tree. If this is the case, focus does not need to be changed.

SirCmpwn/sway,1ace/sway,ascent12/sway,1ace/sway,ascent12/sway,1ace/sway,ascent12/sway