core: Fix NPE on Template creation

Change-Id: I0d9ed1719db7129be1f560068f8b8c2c707f3efa
Signed-off-by: Martin Betak <mbetak@redhat.com>