When checking for set membership use the objects attribute instead of reading at string directly from XML attribute.