You're right about this. beer is going from keg pressure to ambient too quickly, which is causing virtually all the CO2 to come out in foam. You know the beer is getting carbonated, or the foam wouldn't happen at all.
How long are your lines and what is your serving pressure?