[FIX] Namespaces: correct preceding-sibling check. Closes #697