Nope, circling a moon orbiting a planet doesn't count as leaving the planets orbit, since the moon is still in the planets orbit.