I would assume the same. What you do is also what is explained in
this video (around the 5 minute timestamp).
There may be an issue elsewhere in your template, but if this is the only place where that variable is used, and you can't find a solution (and nobody here knows what the issue is), please check with Aruba Support. They may have tools to analyze your template or see more in detailed why this error is thrown.
------------------------------
Herman Robers
------------------------
If you have urgent issues, always contact your Aruba partner, distributor, or Aruba TAC Support. Check
https://www.arubanetworks.com/support-services/contact-support/ for how to contact Aruba TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or Aruba Networks.
In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
------------------------------