nominatim: replace node references in templates with variables