fix dom('.foo'), i.e. selection in the document context 

`document.firstChild` is not always an element and there is no need for this anyway.