Reduce number of used texture units correctly regardless of the order in which texture units are cleared.