Reworked lumping code re issue #165