This happened to me a while back, the foaming and all.
I didnt really look into it though. I simply drained it. On my 540i theres a hex nut and a drain plug. A catch pan grabbed most of it, not that it missed ... but it didnt drain 100% for some reason. Then I just topped it off again. It was still the same for awhile but it has greatly improved and I no longer hear the sound or feel the rumble.
Im not sure how you'll deal with the 515 as I'm not sure if it even has a drain plug. I've heard it doesnt anyways. Someone tell me I'm wrong...