fixes #6370 - auto-associate templates and operating systems