...and welcome to the forum!
Polystyrene and petrol together make napalm (or something very similar to it, I seem to remember from the anarchists cookbook which I'm sure if you googled for now would get you on the security service "watch" list), because the polystyrene dissolves and if you add enough you get a sticky flammable mixture. I suppose other things like polystyrene would do the same thing, but I'm pretty sure that not all foams are the same. It appears Quanta that you've since tested your foam and it doesn't behave in the same way, so I'd say you're safe from creating napalm!
Anyway, thanks for sharing details of your solution with us, and I know from what you wrote that you are aware that it is not a repair, but a compromise - I'm sure you'd rahter have a brand new fuel tank. Others don't have to do the same thing as you, and since this is the internet we can all voice our opinions about it. I myself had the stinky petrol smell problem, and only seemed to have it with a full tank. I decided that it was the filler hose not connecting to the spout on the tank correctly and solved the problem
thus. I've since had a petrolly smell when filling up again, so perhaps I've got a leak similar to the one you have. The difference is I don't remember anyone telling me my idea was crazy at the time...but maybe it is?
In terms of a small amount of petrol vapour (even a small amount will totally stink, but not be flammable in air (maybe pure oxygen)), how different is a small amount escaping from a hairline tank fracture than what would come out of the tank overflow normally?