The coding itself is correct. It looks more like an implementation issue on TFDI side.
The reference of the recommended navaid HEL is only used to generate the WPT based on the distance and it should use the track based on the current aircraft position.
It looks like CD-Legs are Interpreted the same way as FD-Legs.
For comparison the same leg on the PMDG 737 where it looks much better.
Magvar is not an issue here despite the real RWY heading in the sim based on Magdec.bgl is 218 vs. 217.
If aircraft developers would make use of ARINC 424 Procedure Design Magvar (PMDV) records and Navigraph would include them in their database, then those issues could be solved as well as the aircraft would then be completely independent from the Magdec.bgl in regards to the path terminator leg construction. The compass would however then still display the readings based on Magdec.bgl but the construction of the leg would be correct as the tracks and the magvar would always match to each other.