Fix filter terms not being transformed correctly.