Clear @object_id_keys memoization cache when a new key is defined. Closes #534.