Robustness of flat-band superconductivity