The nonlinear evolution of field line resonances in the Earth's magnetosphere