kernel - Fix global counter used in lockf assertions