Lock.release(): move assignment to self.acquired_until so it's protected by the lock.
prevents incorrect detection of a double release.