Dynamical small-scale magnetic islands as a source of local acceleration of particles in the solar wind