(Just in general, I'd prefer for ship AI-related things not to go in the "Bug Reports" forum. What is and isn't a bug here is usually extremely fuzzy, and aside from that, AI things often need a bunch of discussion, which I'd prefer not to happen in that forum.)
It actually is coded to turn on PD regardless of flux level when there are incoming missiles, btw, though It'd probably do it when they're closer than might be optimal. Giving it a quick try, it seems to be working.
PD should also be one of the last things turned off as flux rises, since that's based on flux costs, and PD tends to low have flux costs, though, yeah, for the IR Pulse, that wouldn't work out.
If you've got an example where this behavior is easy to observe, I'd be happy to take a look!