I had the same type of mystery with my roof. When I got the car I found that I could open and close the roof by holding down the buttons on the key fob. I disconnected the battery to change the starter motor and it stopped working. Today it's back again, who knows what mysterious ways the Z4 works. 
