I can confirm that the fix above resolved my config problem. Though my install is still not fully working, problems with My files, but I'll keep persevering.
I get the following error whilst configuring HAP for the first time. I've filled in the general and Active Directory tabs successfully, but any attempt to save results in the following error. I've checked and a hapconfig.xml has been created.