Fixed issue where inheritance would break on an included template