Add #where support for MemoryScope.