Does the magazine lock in place when the receiver is out of the stock (assuming it's a short action)? The problems I've had with magazines not locking in place have been with the plastic pieces in the stock moving out of position. On new stocks it occasionally seems to be the front latch plate that isn't seated deeply enough. If it's the problem, I'll knock it completely out of its place, make sure there aren't any obstructions in the groove, and then reinstall firmly. The rear catch I've only ever had come loose after hundreds of rounds fired. On new stocks they all seem to be in good shape.

I'd be apprehensive about using bedding to overcome inletting bad enough to throw off magazine lockup. I also don't think I'd start bedding a stock that wasn't free floated yet. That's just be my preference though.

If all else fails, you could pull the lug, tape it in position on the barrel, and epoxy it in place when you bed the receiver.