Fix not to reuse unfiltered expr for filterExprBySource

`return expr` in the last line of `filterExprBySource` can
return unfiltered results, so fixing it by reconstruction
using filtered elements.

also added a test which can cause this problem.
Merge pull request #1269 from blmarket/master

Fix not to reuse unfiltered expr for filterExprBySource