What a terrible fright both you and your baby must have had. I am so glad that you were there with her, thank goodness. I always put them/tags on a sturdy key rings and not those tiny little ones that come with the rabies either. I know that you were in the moment and of course helping your baby was your first response but for anyone else who might end up in the same scary predicament:
Unsnap the collar instead of ripping a hole in the mattress !!