Relaxed the ordering contraint on the URI matches.

Solved by doing smart insertions.