Use @inbounds for filt

This gives a speedup of ~25%
Merge pull request #5000 from simonster/filt-inbounds

Use @inbounds for filt