Oddly enough, I had the same experience last night! My rack was unfortunately made to hold tubs with lids, so I've been boosting them up with furniture sliders (only on the big tubs). Well, Nerissa did the same trick as your snake, and got her head stuck in the gap on top. I was in bed watching TV, and just heard a whole commotion coming from her tub... when I went to check she snapped her head back in, pulling off a few scales along the way.

She has a small abrasion on the bottom of her chin now, but luckily seems fine otherwise. Oh, and I put the lid back on her tub after that! Glad to hear your snake is fine, and this is a good warning to the other keepers.