Fleshed out implementation of filterStream() some more. Part of #932