Fixed some issues with Makefile TEMPLATE_* vars that were expected to be arrays or easily importable as one