Better handling of snapshots where a scope contains child scopes

Previously we didn't treat nested scopes as scopes, and executed any functions they contained in our own scope, which basically produces strange results.
Now that Consistent's internal merge function doesn't skip $ properties, we must prevent $ from being clobbered in a merge