why not create a set for the stripped one and use strippedHeaders.contains(_) in the filterNot?