RT#83929: fix memory leak in union types