Handle unexpected end of input in nested filters
Allow limiting maximum nesting depth.