Add support for nested input filters for errors

I realized that the previous way for extracting errors did not work when you had nested input filters. This handle that correctly (although it's less performant... but for now let's stick with that ^^).