compiler/libec: Fixed mistake in last commit
- Was accessing templateParameter member without ensuring we're dealing with a template type