References #2509: Fixed off-by-one error during filter serialization.