When to estimate sex ratio in natural populations of insects? A study on sex ratio variations of gall midges within a generation