Have layouts choose most general route first

https://github.com/opencart/opencart/commit/19614693ef6f2f381e2684c080ed9b039a09f22a