Influence of reflections on mode competition in gyrotrons