That "flat device" is the bolt hold-open. Remove your upper so you can see, and then put an empty mag into the lower. You'll notice that the follower of the magazine pushes the bolt hold-open into the up position, which is how it locks back on an empty mag.
If this isn't happening, then your mag is the most likely culprit. Either the follower is binding (if so, install the anti-tilt Green Followers) or the spring is worn. You can try stretching the spring, but if the spring is the problem, you're better of replacing it. Bushmaster has kits.
You can also try putting some oil on the bolt hold-open pin, or check to see if it's rubbing on something that would prevent it from moving up and down smoothly.
Anyway, why is this in the Legal forum? [:)]
-Troy