Add #where support for MemoryScope.

What do you think about refactoring this to use `#where` ?