With the runtime with the union fix, the test case correctly prints 0. So we are left with one mystery: why did the original runtime produce correct results for you (0) but wrong for me (-Infinity).