BUG: replace with a dict misbehaving (GH 3064), due to incorrect filtering
Merge pull request #3072 from jreback/replace3

BUG: replace with a dict misbehaving (GH 3064), due to incorrect filtering