A vertex detector working as an active target in multi-hadron production on nuclei