fdo#69027 check for state_.top().locked

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>: I wonder why I originally
introduced State::locked in addition to State:ignored in the first place, but
can't find a good reason for that now. So the patch looks ok, though it could be
further simplified to completely get rid of State::locked. Will do that in a
follow-up commit.

Change-Id: If07a07b21effbf42918408a0b60b2d18bdc8665c