I had a similar problem with my I6. It was traced to the Body Electronics Module, (under the dash between the steering column and the radio) specifically a dry joint somewhere in the smartlock circuit in the BEM. The easy fix was to just cross the two wires that are the signal in from the ignition and the signal out to the engine computer, bypassing the smartlock circuit in the BEM. I can't recall the colour of these two wires, but they were the same colour and adjecent to each other on the plug.
Obviously, this change disables smartlock.