Hi,
Don't think it has anything to do with your CONFIG bits, it sounds more like a RMW issue to me. To verify if that's the case either insert a PAUSE between the setting the output and the DEBUG statement or control the LED by writing to LATD instead of PORTD.

/Henrik.