Avoid access to already-released lock in LockRefindAndRelease.

Spotted by Tom Lane.