Add #where support for MemoryScope.

You could have a method named `assert_valid_conditions`, and then do all the tests before the reduce block.