(PUP-1973) Fix getting scope vars to template for inherited scope

The change in PUP-1220 (turning off access to dynamic scope)
accidentally also turned off access to inherited scope.

This is a big problem because it blocks the most used pattern of getting
parameters into classes in modules (and then accessing them in
templates).