Again, there might be no cache. What's happening is:
The change in redstone output starts vanilla minecraft's notifyBlocksOfNeighbourChange. That takes a block and calls onNeighbourChange for all neighbours of the block. This happens for all neighbours of the original block (gate) plus the gate itself.
Now, on pipes, this leads to them updating their signal state (at a bad time), which leads to flickering. So unless something else triggered the onNeighbourChange, I want to cancel it. And this leads to again checking all neighbours and neighbours of the neighbours ands asking if they are pipes.
The "neighbours of neighbours" is the tricky part, because the neighbour who I am asking for his neighbours  doesn't have to be a pipe nor have a cache. Therefore, this.
And I am starting to hate the word "neighbour".