You need to tell calibre that the strings on lines 4 and 5 are sub-templates, not constant strings. The template should be
Code:
program:
test(
field('series'),
template('{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}'),
template('{author_sort}/{title} - {authors}')
)
Also make sure that the template is not set in the kindle plugin (preferences -> plugins -> device interface plugins -> kindle (the right one)). The template in the plugin overrides the template in send-to-device.