Gravitational and Schwinger model anomalies: how far can the analogy go?