locking: Add temporary sanity checks.