Adjust the visitor logic of the template target as well as the consumption of the visitor result to account for two-way bindings. This sets up downstream consumers for being able to handle the possibility of a template position that targets both an input and an output. PR Close #40185