I am glad you have fixed this very frustrating problem! I have been slaving away for the past 15+ hours trying to find the perfect combination of ROM+Kernel to obtain s-off on my htc one. I have lost count of how many combinations I've tried!!
Could I please ask you for the link to the stock rom you used? I have Bulletproof and Twrp 188.8.131.52 currently running, thanks !!