Diffractive production of charm in DIS and gluon nuclear shadowing