Fixes #2689 - Makes pass tests about filtered replication

This replaces PR #2751 ; this time travis just passed, and its just 2 simple commits, from my own master branch.

@nolanlawson ?