I had that happen to my 7 when I allowed the battery to die during storage.
The batery didn't become "stupid", but the computers did!, they all store a small electrical charge to retain their memory of user settings and driving behaviour. The "under voltage" conditions scrambled their memory so bad the engine would only idle on a few cylinders and Check Control would tell me that components that wern't even fitted to my car were failing!.
Jump starting can still result in an under-voltage condition, and fully charging the battery outside of the vehicle is the best way to avoid electrical problems later on.
I fully trickle charged the old battery and after following a "reboot" procedure, which involves removing the battery and bringing the positive and negative battery leads together for 60 seconds, the car has been running better than when I test drove it
I CANNOT vouch for this procedure working on X5's, but if there is a similar procedure for rebooting them, maybe this could save someone the hassel of buying a new battery.
WARNING!, shorting a live circiut can cause severe damage to a vehicles electrics or make the battery explode, in some cases, always remove the battery/s from a vehicle before shorting the cables during a reset procedure
__________________
My much loved machines...
1990 E32 BMW 735i - Daley Driver
1983 Okuma LB15 Twin Turret NC turning center - Money Maker!
1985 Suzuki Sierra - Off-road thrasher and mobile shooting platform

1981 HMT NH26 20HP 30" Gap Bed Engine Lathe - Money Maker!
1966 Lancia Flavia 1800 Coupe - Weekend toy
1941 South Bend 9" Model C Workshop Lathe - Antique restoration project.