check mime-keyed metadata first, then top level