Allow overriding templates

Allow overriding templates.

Maybe there should be an argument to template, to say that you know that you are overriding a template. Something like `<template override=true>` or something. Otherwise an error could be thrown. For now it just silently allows it.

Or, you should not be able to define the same template multiple times inside the package, but the app can override the template defined in a package (or another package can redefine the template from some other package)

Related #2833.