Add #where support for MemoryScope.

On second thought, I think you're right. Chances are the set is unique, and it'll only match once, but the short-circuiting could save lots of time with a large list.