Population trapping in the Jaynes-Cummings model with a Kerr nonlinearity in the cavity