If ever forced to check your bag, explain that you hadn't expected to check your carry-on, and you'll need a few minutes to remove some valuable items, medications, etc.
Don't rush through this. Take whatever time you need to be thorough about it. It's amazing what the risk of delay will do in resolving the space issue for your bag.