I believe it has to do with the voltage the phone sees and with iOS 7 it is much more particular. If the wall adapter is warm or large current are being used, the voltage drops. If the phone is dead, it will draw more current and make the wall charger hot which drops the voltage.
Try these tests:
Plug your cable into your normal charger (USB port, iPhone charger...)
Try charging your dead phone
Next try charging your phone when it is almost full
See if the error comes up.
Then try an Apple iPad charger (2.1A or 2.4A) since it can handle more current and will remain cooler.
Try charging your dead phone
Next try charging your phone when it is almost full
See if the error comes up.
In my experience, when drawing more current, it makes the wall charger (or USB port) drop the voltage which causes the error.