One of those fell in my washing machine when I wasn't looking and it got emptied during the cycle.
Ruined my clothes and the machine wasn't happy about it but it eventually worked fine after a few cleaning cycles.
The "liquid nails" type of expanding foam however, I'm pretty sure that would fuck up anything.