By always restoring the ID, we are guaranteed to only store the query in the form that it was originally sent in. This should be changed so that the ID that the client sends can be used as-is in the backends.