LPS-40901 fix selection of templates from the global scope