Fix placement for kernel:package in curtin template

Change-Id: I48c54019146471f3d946ea4fef824f6987a20a03
Related-prod: PROD-32388
(cherry picked from commit 1dd8e20e0e368e16978792c0c04c1c0d22a99dee)
diff --git a/maas/files/curtin_userdata_amd64_generic_xenial b/maas/files/curtin_userdata_amd64_generic_xenial
index 98c7758..afc18a5 100644
--- a/maas/files/curtin_userdata_amd64_generic_xenial
+++ b/maas/files/curtin_userdata_amd64_generic_xenial
@@ -49,11 +49,6 @@
   salt_11_recon_randomize: ["curtin", "in-target", "--", "sh", "-c", "echo 'recon_randomize: True' >> /etc/salt/minion.d/minion.conf"]
   salt_12_auth_timeout: ["curtin", "in-target", "--", "sh", "-c", "echo 'auth_timeout: 60' >> /etc/salt/minion.d/minion.conf"]
 
-{%- if salt['pillar.get']('maas:cluster:curtin_vars:amd64:xenial:kernel_package:enabled')|default(false)  %}
-kernel:
-  package: {{ pillar.maas.cluster.curtin_vars.amd64.xenial.kernel_package.value }}
-{%- endif %}
-
 {% raw %}
 {{if third_party_drivers and driver}}
   driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg"
@@ -66,6 +61,11 @@
 {{endif}}
 {% endraw %}
 
+{%- if salt['pillar.get']('maas:cluster:curtin_vars:amd64:xenial:kernel_package:enabled')|default(false)  %}
+kernel:
+  package: {{ pillar.maas.cluster.curtin_vars.amd64.xenial.kernel_package.value }}
+{%- endif %}
+
 {#
 # vim: ft=jinja
 #}