Self-guiding of an ultraintense laser requires the refractive index to build up rapidly to a sufficient value before the main body of the pulse passes by. We show that placing a low-intensity precursor in front of the main pulse mitigates the diffraction of its leading edge and facilitates reaching a self-guided state that remains stable for more than 10 Rayleigh lengths. Furthermore, this precursor slows the phase slippage between the trapped electrons and the wakefield and leads to an accelerating structure that is more stable, contains more energy, and is sustained longer. Examples from three-dimensional particle-in-cell simulations show that the conversion efficiency from the laser to the self-trapped electrons increases by an order of magnitude when using the precursor.