Consider the proof of the Hilbert's Nullstellensatz using the Rabinowitsch trick, as found e.g. in Lang's Algebra, Theorem 1.5, p. 380, which i reproduce here convenience.
In particular, let $\mathfrak{a}$ be an ideal of $k[x_1,\cdots,x_n]$ and $f$ such that every element in the zero set of $\mathfrak{a}$ is a zero of $f$, where the zero set is a subset of $\bar{k}^n$, where $\bar{k}$ is the algebraic closure of $k$.
Then the Rabinowitsch trick is to introduce a new variable $Y$ and consider the ideal $\mathfrak{a}'$ generated by $\mathfrak{a}$ and the element $1-Yf$ in $k[x_1,\cdots,x_n,Y]$. If $\xi \in \bar{k}^{n+1}$ is a zero of $\mathfrak{a}'$, then the first $n$ coordinates of $\xi$ must form a zero of $\mathfrak{a}$, and so of $f$, contradiction, since $1-Yf$ evaluated at $\xi$ equals $1$. Hence $\mathfrak{a}'=k[x_1,\cdots,x_n,Y]$ and so $1=g_0(1-Yf)+g_1 h_1 + \cdots g_n h_n$, where $g_i \in k[x_1,\cdots,x_n,Y], \, h_i \in \mathfrak{a}$.
Then we substitute $Y \mapsto f^{-1}$ and multiplying by a suitable power of $f$ we obtain that $f$ is inside the radical of $\mathfrak{a}$.
Here is my concern: What values can we substitute for the variable $Y$? Observe that the value $Y = f^{-1}$, "cancels" our original construction of introducing the element $1-Yf$, since we effectively introduce $0$. So, it seems to me that the crucial equation $1=g_0(1-Yf)+g_1 h_1 + \cdots g_n h_n$ is not valid for $Y=f^{-1}$.
Any insights?
PS: By no means i am not implying anything about Rabinowitsch's trick, i just want to see what i am missing and how this "gap" can be filled.