One problem with using foam to fill void spaces: If the space is not fully sealed afterwards, water can gradually waterlog the foam, which will then accelerate corrosion. I've seen that problem in older vehicles with steel bodies. The results were not pretty. Furthermore, polyurethane foam needs a slight amount of moisture to cure properly. You will note the cautions on the cans that. say not to spray into sealed spaces. Another, and safer alternative, IMO, is to use plain old paint, or sound-deadening undercoating (good undercoating like Wurth or 3M, not the asphalt stuff most McParts stores sell). Either of those should glue the loose rivet ends in place in the bottom of the panel.