I had the same issue. Upon inspection of the track, I found the frame itself had been compromised. You can repair most pieces with a repair kit, but not the actual frame.
So, I now have a 2011 moonroof in my 2007. They are the same for all e70 year models. Not sure after that.
The repair kit was something between $150-$200. I found this 2011 moonroof for $400. Replacement is pretty straightforward. You do have to remove the headliner. It took about half a day for me and a friend to complete.
Sent from my iPhone using Tapatalk