Currently the queries attribute defined on the Workspace Metacard type is XML, and should contain the current queries on the workspace. When working via the catalog UI endpoints this field is protected against bad data, as it must first be successfully serialized to XML before getting sent to the catalog framework for update.
However, since there are alternate ways for updates in our system to happen to [workspace] metacards (EG, via CSW), external systems can upload incorrect or malformed data causing instability of assumptions throughout the system.
This problem should be fixed by implementing some sort of pre update + ingest plugin that validates the data inside of the workspace metacards Queries attribute, ensuring that the data stored in the system is always reliable. (This could also be implemented as an "ValidXmlValidator" and added to the JSON definitions validation capabilities, such that other xml attributes in the future could also benefit from it).