Prevent double counting of DM nodes in getNodeAndOffset

About grouped templates, for example, render multiple siblings
in the DOM, but still have a DM width of 2.

Bug: 67985
Change-Id: Id65e858b90bc7ab5a4d6ba715db30574691817b9