Fixing a bug where the app context model passed to visitDetailsTemplate on the visits page of the reference application was always getting the currently-active visit, not the selected visit