Overwrite discriminator settings in metadata if not present in parent class

Same problem as in #182.