My guess is that it is just a bad connection. Take it apart again and go over each and every connection and check the continuity with an ohmmeter. I had the same problem on my 2012 X5 but it was the inner light on the passenger side which is the LED light. The outer light has incandescent light bulbs. It was an on and off thing at random. I fixed it, but the bad connection was subtle - one side of the connector slightly pulled and twisted. Good luck!
http://www.bimmerfest.com/forums/sho...636&highlight=