Don't create LockElement unnecessarily

Don't create LockElement unnecessarily. This drastically reduces object churn under normal operation, as LockableWindow.lock() is a common operation.