Though your friend was nonchalant about the situation I'm sure he felt like a fool inside and tried to play it off. I'm glad you spoke up when so many people wouldn't have, and I'm even more glad that when he tried to make you seem like an overcautious fool that you stuck by your principles that safety always, even after safety has been assured is the unspoken universal firearms law.
you are very fortunate to have lived through this experience and learned from it without any punishments. Consider yourself presently at the height of luck and go buy a lotto ticket. Several of my army counterparts on base here have experienced ND's, to the point where I have to clear my clear and safe weapon 3 times between the ECP (entry control point) and the armory where I turn my weapon, WITH two person integrity. It's a pain in the ass, but one I accept knowing that I will not be the next person to ND and all my shipmates won't be either, with the added benefit of proper clearing and safety techniques being drilled into their heads over and over again.
The army incorporates a function test into their clearing process (at least here, I can't speak for their written policy) and thats what lead to the ND's, function checking before properly clearing the weapon. clearly the weapons worked,
Navy procedures is to verify the safety is on safe, drop the mag, rack the weapon and visually inspect the chamber to verify clear chamber, and, again, verify safety, all the while the weapon is either in a clearing barrel OR point into the safest possible direction. You can never, EVER possibly ND with this process. hence we've been here for awhile and not a single ND. I use the same procedures back home and taught my family.
always drop the mag first.
and thanks for having the courage to admit your mistakes. not only will you be more than doubly careful, but this is a very real reminder to people of what happens and what COULD happen when you forget that one little thing.