Made AutoLocker capable of handling constant pointers.