Context. A well-known bottleneck for the core-accretion model of giant-planet formation is the loss of the cores into the star by Type-I migration, due to the tidal interactions with the gas disk. It has been shown that a steep surface-density gradient in the disk, such as the one expected at the boundary between an active and a dead zone, acts as a planet trap and prevents isolated cores from ...