  Understanding of bonding is key to modelling materials and predicting
properties thereof. A widely adopted indicator of bonds and atomic shells is
the electron localization function (ELF). The building blocks of the ELF are
also used in the construction of modern density functional approximations. Here
we demonstrate that the ELF breaks down when applied beyond regular
non-relativistic quantum states. We show that for tackling general
non-collinear open-shell solutions, it is essential to address both the U(1)
gauge invariance -- i.e., invariance under a multiplication by a position
dependent phase factor -- and SU(2) gauge invariance -- i.e. invariance under
local spin rotations -- {\em conjointly}. Remarkably, we find that the extended
ELF also improves the description of paradigmatic collinear states.
