Note: in general, it is possible that a literal can expand out into multiple id values. The strategy for handling
these should be that if ALL values are sanitised, then modification should occur, but if at least one is okay
then we should keep the original literal.
literals - the literals to sanitise; must not be null.
the result object, which states if there was any modification, and also contains the resultant literals. Never null.