Is it non-agressive as soon as you're not flying? It's not a bug I've ever heard of, and I have flown past an iron golem using a jetpack without any issue, but unless you previously caused it to become agressive to you it sounds like a random bug.
Nah, it just attacked me a while after I dimped down on the ground. But think it has to do with a villager I killed. The golems keeps attacking me, even the newly spawned after I killed the old ones. Had to bury them to "fix" it lol