preserve global definitions separately by their kinds