Latte: fixed the template inheritance