Lambdas in multi level 

Lambdas in multi-level inheritance situations are currently being substituted incorrectly. This PR should fix that. The problem is that the test to see if `activeSub` undefined was always returning true for this situation and the text at the highest level was always being used.