correct test and fixing lambda substitution for multi-level inheritance