Add #where support for MemoryScope.

Is there any way this could be formatted to avoid the long lines?