Fix issue with nested template not getting replaced for async setup calls