Same thing happened to mine with the Hilux Surfs rear door, at first it was working, then the sensor/switch became faulty and eventually failed leaving me without rear door indicator on the dash. I had to open the inside panel of the rear door and check for voltage & continuity all the way to the main plug up the headliner..I'm getting power across.
The problem lies within the back door lock assembly itself, it could either be the sensor or some switch inside the lock assembly itself malfunctioning. I just took the one from the 4runner and swapped the lock assembly and the striker assembly including the plug-in wire and the latch/lock cable. Easy switch and problem solved.
The index number for the lock assembly is
69350
For the striker assembly
69430C
http://www.google.ca/url?sa=t&source...2uhxtg&cad=rja
I would suggest first that you inspect the one you have by removing the 3 10mm bolts holding the lock and striker assembly, see if you can somehow dismantle it..maybe it's just stuck-up and needs cleaning or lubing. I just didn't bother doing it since I have a replacement in hand.
Good luck!