Added a fix for #891 (Using a /foo selector within a non-document context.)