Use canonical locking order in state cache