I found multiple fixes for this yesterday. I am a Nissan Master technician and work for a dealership. Yesterday we had an X5 with a check engine light on for the temp sensor malfunction inside of the active tank. I data monitored this issue and found sensor showing 25 degrees constant and it was currently 89 degrees outside. I gathered enough information from this thread to go into the tank myself and find a solution. I cut the wires going to the temp sensor and wired in a 10k 1/2 watt resistor and now my temp sensor shows 77 degrees all the time and killed the check engine light. I drove the vehicle home last night and back to work this morning and still no light. now I realize this fix wont hold up for when cold weather comes along, so I dug deeper to find a permanent fix. I found 2 options that work. I found that a standard fuel tank temp sensor from any of our Nissan vehicles will send the correct resistance value and is safe to drop inside of the active tank to correctly relay the right temp. option number 2 is slightly more costly, but it will fix this problem with a FACTORY style fix. I was unable to find a cheap BMW tank insert, so I got manufacturer names and sought the same part for other brand vehicles and hit gold on VW. here is a link to ebay for the part that matches the bmw part 100%
2007 2010 VW Volkswagen Touareg Heater Element for Urea Tank 7L6198970A | eBay
I hope this helps and I did photograph my adventure of fixing the tank with the 10k resistor.