Section - The fedora
The player is wearing your trusty fedora. The fedora is a container. Understand "hat" as the fedora.
Check inserting something into the fedora when the player is wearing the fedora: try taking off the fedora.
Check wearing the fedora when something is in the fedora: say "You'd better empty the fedora first." instead.
Report inserting the lamp into the fedora: say "You use the fedora to shield the lamp from the gusts of wind." instead.