Fixed issue where the incorrect number of layers were generated by aux_util.layerize()