The engine reroutes the connectors glued to the shapes they join after every
command that can move a shape. The reroute can move a connector even when the
command itself changed nothing, and that movement has to be undoable: the
step the command's dispatch pushed may not be put away before the reroute has
run.
The command's own change is now decided first, so the reroute still sees the
new layout, and the undo step is put back only after the reroute, when
nothing moved.
The typing behaviour is pinned in tests_typing.rs, as a typing fix is.