I'm a little confused by your "solution". The hopup chamber *is* supposed to rest against the front of your mechbox, I don't know how it can be "too far back" since the mechbox would be where/what it'd stop against. It's spring-loaded in order to do this.
And the "flat piece of the hop-up assembly" you refer to... You mean the little spring loaded clip at the top of the inner circumference of the hopup chamber? As in, the narrow plastic thing that the nozzle has to travel past to mate with the hopup bucking? Again, that's part of the design. I believe it holds the BBs in place until the nozzle rams them into the hopup bucking.
G36 hopup guide:
http://photos.returners.org/gallery/G36HopUpUnit