Fix for crash in formatBlock command

FormatBlock command crashes when format block
tries to insert node at a disconnected position.

This CL does a safety check and does insertion
only if the nodes are connected.

Bug: 806525
Change-Id: Ie3cc803cfa09bd6013f291d374d792d88d89e49c
Reviewed-on: https://chromium-review.googlesource.com/913189
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536253}
2 files changed