BUG-576: fixed bug in parsing of union types.