I had the same problem in my HTC one M7 (couldn't clear PIN lock after installing FoxFi) and this was the only solution that worked.
The article raised a security issue but here I think clearing credentials kept the important ones, as my phone still has dozens of system credentials registered...