The freemarker <#ftl> tag must always be the first tag in a freemarker template: "This directive, if present, must be the very first thing in the template." on 1). The base-layout.ftl file does not have that. The import statement that includes the file with that line is on the second line of the template.
Please check all other import statements in other freemarker template files to see if it is added as the first line.
Also in base-layout.ftl: the tag <@hst.defineObjects/> is used, but that is already included in the imported file, so that can be removed here. Please check that freemarker template files in Essentials that import the imports.ftl file do not use that tag again.