These are fixed in netlib, regression tests added here.
Finally doing what I started writing pathod for in the first place...