It is well known that topological $\theta$-terms in gauge theories are total derivatives and vanish after integration over the Lagrangian (or Hamiltonian) density, unless there are nontrivial boundary terms corresponding to a nontrivial topology of the theory's vacuum. For example, the $\theta$-term of quantum electrodynamics (QED) in 3+1D dimensions vanishes after integration, because the vacuum of the $U(1)$ gauge theory is trivial, i.e., there are no instantons.
To find out whether a vacuum is nontrivial, we usually compute the $j$th homotopy group $\pi_j$ of the gauge group $G$, where $j$ is the spatial dimension of the theory. If $\pi_j(G)=0$, then the vacuum is trivial and the $\theta$-term vanishes. For example, $\pi_3(U(1))=0$ and $\pi_3(SU(3))=\pi_3(SU(2))=\mathbb{Z}$, so we have no $\theta$-term in 3+1D QED but $\theta$-terms in 3+1D quantum chromodynamics (QCD) and electroweak theory (however, the electroweak $\theta$-term can be eliminated by a chiral rotation).
Now I've stumbled across some seemingly inconsistent arguments in various different books (including "Advanced Topics in Quantum Field Theory" by Shifman) about which homotopy groups we need to consider in different dimensions. (All these books are not available online, but Tong's lecture notes on Gauge Theory briefly discusses these issues in section 7.)
The arguments go as follows:
(i) 3+1D QCD contains instantons because of $\pi_3(SU(3))\neq 0$ (see Eq. (20.6) in Shifman's book),
(ii) 1+1D QED contains instantons because of $\pi_1(U(1))\neq 0$ (see Eq. (33.38)),
(iii) the 1+1D $CP^1$ model contains instantons because of $\pi_2(CP^1)\neq 0$ (see Eq. (29.6) in Shifman's book or Tong's arguments below Eq. (7.28)).
However, when applying the arguments (i) and (ii) to (iii), I would expect that there are no instantons and therefore no $\theta$-term in the 1+1D $CP^1$ model because of $\pi_1(CP^1)=0$. Shifman and others argue that we can treat the time direction as a compactified spatial direction in the 1+1D $CP^1$ model, but they only use this argument for the $CP^1$ case! Thus, they consider Minkowski space in the cases (i) and (ii) but Euclidean space in case (iii).
Aren't these arguments inconsistent? Apart from that, even if they somehow hold true in the Lagrangian formalism, shouldn't they break down in the Hamiltonian formalism, where we cannot compactify the time dimension (see, e.g., above Eq. (3.5) in arXiv:1301.4158)?