Resonant Trapping of the Moving Groups G18-39 and G21-22 in the Galactic Halo