Fixed issue #8332: JS files are not imported during template import