Assertions should fail but not crash when path doesn't match anything, close #1910