Make sure ErrorPageFilter is only applied once per request

Fixes gh-1257
Merge branch '1.1.x'