The steam (and hot water) switches are both quite fragile and it looks like you are correct in assuming you have broken it putting the top of the machine back on.I've noticed there's a few little bits of plastic that have broken off the steam switch, I think from me trying to put it back together. I've attached a photo to show the switch. My guess is that these little bits break the link in the switch so it shuts completely off, but without them there it keeps it active?
The switch is not securely fixed in position and just sits over a couple of plastic pins so it is prone to jumping out of place and getting broken as the top is pushed down over it.
From your photo it looks as though the actuating button and lever have both fallen out when it broke and it has it gone closed circuit, so you will have to replace the switch.
Here is a photo of a complete switch assembly -
If you are OK with soldering you should be able to source another similar switch from somewhere like Jaycar and replace the broken one, or take the machine to a repairer and have it fixed.