Oh shit thats bad news.
Use std head bolts you don't want anymore issues.
Question is if the bolt came loose how can it move 180 degrees and the woodruff key would stop the pulley moving or is it the peg is attached to the outer and bolt then came loose?