MDSAL-361: Deal with restricted types in unions