Suppose I observe a random sample $X_1, ..., X_n$ from some continuous distribution $F$ and I want to estimate the parameter $\eta_q \equiv \mathbb{E}[g(q, X_i)]$ where $q$ is some specified quantile, e.g. the median, of the distribution of $X_i$ and $g(q, X_i) = \mathbb{1}(X_i > q) X_i$. If $q$ were known, then I could appeal to the central limit theorem to argue that $\sqrt{n}(\widehat{\eta}_q - \eta_q) \rightarrow_d N(0, \sigma^2_q)$ where $\widehat{\eta}_q = n^{-1}\sum_{i=1}^n g(q,X_i)$ and $\sigma^2_q = Var[g(q,X_i)]$.
But suppose that $q$ is not known and must be estimated by a corresponding sample quantile $\widehat{q}$. My question is how to account for the preliminary estimation of $q$ in the asymptotic variance of $\widehat{\eta}_{\widehat{q}}$. My confusion comes from the lack of smoothness of $g$ as a function of $q$. I understand how to handle the more standard case where a moment function depends smoothly on a preliminary estimator for some parameter $\theta$.
Update: It looks like this example should be covered by the approach described in Section 3.2 of Chapter 37 in the Handbook of Econometrics: "Empirical Process Methods in Econometrics," by Andrews (1994). Assuming this turns out to be correct, I will add details below.