I have exactly the same fault on my wifes R34GTT Tiptronic. It used to be once a month or so when it would play up and by turning the ignition off and then restarting it after ten seconds would clear it.........untill the next time. Now sometime it plays up on starting from cold and you can restart it ten times or more, before it will run cleanly without the lights coming on.
I have checked the fault codes with a consult and get "Ignition Signal - Primary"
Suspecting the Cam Angle Sensor, I swapped that for a known good one and..............it still plays up.
Any ideas?