Your question appears to be a special case of this postthis post which explicitly considers prerequisites for AIC model comparison. One of the important prerequisites is that the dependent variable (the vector of observations) is exactly the same across the models being compared; see the answer by @usεr11852, especially his point 2. The dependent variable cannot be a transformation and it cannot have different number of observations in different models (which may effectively happen, for example, when comparing ARIMA and exponential smoothing models estimated on exactly the same set of data (!); read carefully the brief answer to this postthis post).
However, transformed dependent variables can in principle be handled by adjusting the AIC for the transformation: see a comment by @probabilityislogic under his/her answer herehere and the comment by @CagdasOzgenc to your own post.
You may find a number of relevant posts arriving to similar conclusions in this listthis list. Perhaps some of them will be formulated more clearly than I have managed.