Merge #document handling code into importGroup()