Merge "Deduplicate stack masks"