It seems that the sound change came first and then the grammatical reanalysis. This is a process called grammaticalization and is much studied. Laryngeals are interestesting because they were posited by Saussure for the proto-language even though none of the daugther languages displayed them. Then along came Hittite, and it had an example of one laryngeal surviving. Though, Hittite may have been a sister language of PIE. Your mileage may vary.