Tests for compareDocumentPosition and contains. Fixes for tests