Flip some && tests to do the cheap part first

IsXXXDb calls are expensive as they build a CURL object.  While the
HasXXXInfoTag is a cheap != null test.

So do the cheap tests first.  Reduces some of the overhead of the
IsSamePath code.