Fixed issue where all locks are release, but the wait run loop is still

executing.  In this case, no matches will be returned.  As a result, the
check for no other lock contention needs to be first in the list.  Otherwise the list ordering operations will fail.