Try again to fix locations in template expansions