HTC One using battery whilst switched off/not turning off properly

Anyone else having this problem? I usually turn my phone off at night (yes I know - most people don't, but I do) and when I turn it on again after ~8 hours I've usually lost 10-15% battery. The same happened several times last week, and it actually managed to totally flatten itself. Note: this is with fast boot switched off.

I checked GSam Battery Monitor and it seems a process called HTcShutdownThread-shutdown is keeping it awake, meaning the phone never fully turns off. It actually uses less battery whilst on aeroplane mode.

I've tried so far:

  • Flashing various ROMs
  • Moving to CWM from TWRP
  • Flashing back to stock and relocking bootloader
Still it does it. The only way to stop it is to flash a GPE ROM, which I'd rather avoid because I have an N4 for AOSP.
Does anyone have any ideas how to fix this? XDA seems to have no clue.