Fix: Ensure traversal of template strings works (fixes #1489)