Agreed, it's a concern but often these lamps have mechanisms to help prevent them falling off.
http://www.caplamps.co.uk/cordless-led-caplamps-mining/ has a clip on the blade mount that effectively locks it in place. On a thin plastic or metal blade mount you cannot get it off without pressing the catch - literally you can wave a helmet with lamp attached around wildly and it won't budge 🙂 - the one in the photos are of an older version, the latest lamp is smaller and made from much a more matt and nicer plastic. [shameless plug]manufactured for an EU firm so CE marked and currently undergoing ATEX[/shameless plug] 😉
The flip side to that is that it doesn't like Petzl blade mounts which, as Roy says, are rather bulky.
http://www.caplamps.co.uk/cordless-led-miners-lamps/ which is a really nice bit of kit as well. Plus this one has options for elasticated head straps and bike mounts and all manner of worderful things :lol: Not quite ready to start selling it yet though as still got compatibility tests to sort out with existing charger installations at client sites.
I sell about 10 all in one lamps for every lamp with a separate battery box these days
but this is for industry where the chances of crawling or squeezing or generally doing something on a rope where the chances of loosing helmet/lamp are rather less than when mine exploring or caving!
my orders are to sit here and watch the world go by