Fix crash in macdoc

ScrollToVisible is sometimes called on the previous node, and in some cases this previous node does not have a registered wrapper which causes macdoc to crash. This fix adds a check for the node instead of throwing.