Take care of primary decomposition of unit ideal

(the fix is hack until we properly support primary decompostion of submodules)