Moved the branch session reply state inspection to routeQuery instead of clientReply.