Fix memory counting bugs for jupes and glines.