Get rid of code duplication in _get_eigensystem