To calculate the Ito differential of the quantity $\frac{A}{B}$ I can use the Ito product rule which gives
$$ d (\frac{A}{B})=\frac{dA}{B}-\frac{A}{B^{2}}dB-\frac{1}{B^{2}}dA dB $$
if I now let $B=A$, I should obtain the result
$$ d(\frac{A}{A})=d(1)=0. $$
However, substituting into the above the second-order term may be nonzero
\begin{align} d(\frac{A}{A})&=\frac{dA}{A}-\frac{A}{A^{2}}dA-\frac{1}{A^{2}}dA dA\\ &=-\frac{1}{A^2}dA^2. \end{align}
Is anyone able to help me understand what I have done wrong here?
As pointed out in the comments I incorrectly calculated $d(B^{-1})$ by not taking the chain rule to second order. It should be
$$ d(\frac{A}{B})=\frac{dA}{B}+A(-\frac{1}{B^2}dB+\frac{1}{B^3}dB^2)-\frac{dA dB}{B^2}. $$
Which is zero upon substituting $A=B$, as it should be. I hope anyone seeing this ends up wasting less time on this than I did.