2017, The Author(s). We study the non-linear realisation of E11 originally proposed by West with particular emphasis on the issue of linearised gauge invariance. Our analysis shows even at low levels that the conjectured equations can only be invariant under local gauge transformations if a certain section condition that has appeared in a different context in the E11 literature is satisfied. This section condition also generalises the one known from exceptional field theory. Even with the section condition, the E11 duality equation for gravity is known to miss the trace component of the spin connection. We propose an extended scheme based on an infinite-dimensional Lie superalgebra, called the tensor hierarchy algebra, that incorporates the section condition and resolves the above issue. The tensor hierarchy algebra defines a generalised differential complex, which provides a systematic description of gauge invariance and Bianchi identities. It furthermore provides an E11 representation for the field strengths, for which we define a twisted first order self-duality equation underlying the dynamics.