This is often a missing configuration issue as zalion0 has suggested; however I have run into the "D" flag in two other instances. The first is MTU sizing on the network (and compare with AP System Profile) between the AP and the controller. The second was an instance where the customer had some policy based routing on the MPLS network that was not working correctly. In this case, they had seen the following message on the controller. Please check all the logs on the controller for any reference to this AP or AP MAC on that controller.
Apr 25 02:34:12 :305056: <WARN> |stm| AP XXXXX-AP2 No response from AP for REG_DOM_INFO request for 3614 sec; deleting AP.
Just two other suggestions to look at.