Found it myself.
Avia Template Builder adds an action to template_redirect, as does the plugin. But since the one from Avia has a very low priority, those functions added by the plugin never get called.
Solution: in wp-content/themes/enfold/config-templatebulder/avia-template-builder/php/template-builder.class.php on line 176 I set the priority in the add_action call to 20000.