Let $(X, \sigma, \mu)$ be a probability space, $T:X\to X$ a $\mu$-invariant map and $f\in L^1(\mu)$. Define $A := \{x \in X: \sup_n\sum_{i=0}^n f(T^i(x)) = \infty\}$. I would like to conclude that $A$ is $T$ invariant, i.e. that $T^{-1}(A) = A$. Then any $x\in A$ would satisfy $T(x) \in A$, i.e. that
$$\sup_n\sum_{i=0}^n f(T^{i+1}(x)) = \sup_{n}\sum_{i=1}^{n+1}f(T^i(x)) = \infty$$
But what if $f(x) = \infty$, $|f(y)| < \infty$ for all $y\in X\setminus \{x\}$ and $f$ is finite enough along the orbit $T^i(x), i\in \mathbb{N}$ that $\sup_n\sum_{i=1}^{n}f(T^i(x)) < \infty$ and $\mu(\{x\}) = 0$? In this case $T(x)\not\in A$ which would imply that $A$ is not $T$ invariant.
The claim that $A$ is $T$ invariant occurs in the book Introduction to Moden Theory of Dynamical Systems by Anatole Katok and Boris Hasselblatt, p. 136, the proof of Birkhoff Ergodic Theorem