NCF-177 additional fix

More fixes for NCF-177 (renaming variables & dimensions), particularly after an endef/redef pair.