Fix empty document length check in MWReferenceDialog

We now initialize the surface in the dialog with a 4-element linmod
(paragraph, /paragraph, internalList, /internalList) rather than a
2-element linmod. This broke the code that disables the Insert button
in the reference dialog when the surface is empty.

Change-Id: Id733e654a628b1294e697ad4ef3f2f6fe1a9c869
Merge "Fix empty document length check in MWReferenceDialog"