Orbital expansion and resonant trapping during the late accretion stages of the outer planets