Small improvement for nth-of-type filter