Add test for enclosing inheritance.