Only keep looping matching routes if they yield next
Fix resource tests