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.
Merge pull request #614 from apigee/lockdebugging

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