Fix bug where we didn't go through all patterns if the first one failed