The calculation of the matte could lead to a division-by-zero leading to completely different results on different graphics backends. Perform the same checks of the input and key saturation before performing division as it is done in the CPU compositors. The `node keying matte` test is still failing on Metal, but the look of the result is much closer to what it would be.