Okay, but then it seems like a coincidence that you have a second problem. If the switch to turn it on is in the head, then power is going through it when it shouldn't, so I suspect a switch failure. Use a multimeter to check whether the switch is closed circuit when it should be off, and take care doing it if this is a high voltage... most aren't, but in recent years some cordless *things* have gone to 40V or even more. It does not need to be powered on to check switch continuity with a multimeter.
I suppose with these plastic shell type designs, there could be a different problem related to the switch, that the internal baffling that holds it in place could have broken so the button isn't cycling it on and off as it should. In that case I would build a partition out of a piece of plastic and epoxy to hold the switch back where it should be. Heh, it would much easier to figure this out by looking at it rather than speculating. Can you upload the vac and attach it to a post? A picture won't be enough, I need the actual vac to know when it's fixed.
The odd thing is it operates if even the main switch is off, so it could be a bit more complicated, but still a matter of opening the head and checking the switches, then if nothing visual is wrong at some point you'll need the battery in to trace where power keeps going when it should've stopped with the switches off.