Instabilities of a matter wave in a matter grating