Take the locks in the same order