If you wait on an object without first holding its lock then an illegal monitor state exception should occur. When we wait we get the heavy weight lock, creating it if none existing. The inflate process that creates the lock first asserts that the owner of the lock is the current thread. This assert will fail rather than giving the expected illegal monitor state exception.
The fix is to first check an object holds a lock (failing with illegal monitor state if it doesn't) before acquiring a heavy lock for the object.