Fix the order of exceptions in Lock.aquire