Magnetic islands and singular currents at rational surfaces in three-dimensional magnetohydrodynamic equilibria