Optimize transform invalidation.