simplify to `metadata.get(MD_INDEX, set())`