containsNode now also checks node ids