Fixed #238 - Lookup resource returns the less specific tree, but least specific first. Need to reverse the order before iterating through it (check the most specific first).