Unlocalize pks in templates

Backport to 2.3.x of the fix for #2055