Add #where support for MemoryScope.

I'd use `ArgumentError` here.