fix #14217 - replace recursive filter parsing by iterative approach to avoid StackOverflowError for very long filters (~3000 logical operators)