Fix inheriting members in conjunction with eponymous templates.