support user-requested filtering of extensions. resolves #1844.

resolves #1844.
could just use `_.intersect` here