perf: Tighten redundant comparisons and propagate filter constraints (#27999)