Fixing infinite loop

If the parent element hasn't been laid out yet, the editor will get stuck in an infinite loop, using 100% cpu