Ability to put the structure in readonly mode. This is a quick hack to make
it possible to index multiple values for an id. (A better approach would be
to support an array of values to index). This has the added benefit of saving
memory (we no longer have to store the old value to be able to remove it).