Reduce number of used texture units correctly regardless of the order in which texture units are cleared.
Merge remote-tracking branch 'upstream/master'
update