Problem with setting working coordinate systems

I'm using a duet wifi for controlling my cnc router which works fine so far. However I'm experiencing some problems when using WCS (working coordinate systems).

I move my head to a certain position i.e.
G1 X305 Y965 Z70 F12000
The position I see in the web-interface is accordingly X=305, Y=965, Z=70
Then I want to set my WKS to be zero at that point. Therefore I tried the following two commands
G10 L2 P1 X305 Y965 Z70
and
G10 L20 P1 X0 Y0 Z0
which both result in a position X=0, Y=0, Z=70. I would expect Z to be 0 as well.
Now I issue the following command
G1 Z0
The machine does not move but the position display goes to Z=0 and the machine works as expected.
If I don't issue this G1 Z0 my Z-axis is either offset or I get directly and out-of-limits error when issuing any G0/G1 commands result (I don't understand yet when which of these two scenarios happens).

Further if I'm going from WCS1 two WCS2 by issuing G55 I get the position diplay X=305 Y=965 Z=70 as expected and everything is working fine. However when I go back wo WCS 1 (G54) then I get again the strange behavior from above having the position display showing X=0, Y=0, Z=70 with the same consequences as described above.

For me this looks like an issue about how WCS are set for Z-values not equal to 0. However I might as well miss some of the concepts how WCS should work. I'm happy for any support.

@mwinterm I'm the one partially to "blame" for having WCS support in more recent firmware. While I have not written the code, I'm one of the more vocal users of Duet boards with CNC routers/mills. So far, I can't see the problem that you are reporting, but there are two relatively minor differences. I'm on stable firmware:

I also would like to write a generic macro to set the current WCS i.e. doing something like
G10 L20 P1 X0 Y0 Z0
without having an explicit reference to WCS1 but instead just applying it to the current WCS. For setting the tool offset this possible by just calling
G10 Z0 instead of G10 P1 Z0.