distribute the flattening of Medias through the children objects

Signed-off-by: Tomas Neme <lacrymology@gmail.com>