This is needed for locking in the const get() method.