A different approach to a locked check.

Signed-off-by: Petr Kubat <pkubat@redhat.com>