Fix possible crash

- Create three boxes A, B, and C
- Link A and B as L1
- Link C to L1 as L2
- Delete L2
- Move box C
- crash

Signed-off-by: Sven Strickroth <email@cs-ware.de>
dropped lots of unnecessary code