rotation through fixed angle + arbitrary pivot

I started to make a Field of Glory module and on that, I encountered a problem with rotations:
I wanted a command to turn the piece 90° to the side and another command to pivot the piece with a custom angle. So I placed a ‘can rotate - allow arbitrary rotations’ trait first, then the two pivot traits (left and right) and another ‘can rotate - number of allowed facings = 4’ trait at the end. The result is, that the pivot and the right/left turn works fine, but the pivot does not work as it should when the piece was previously turned out of the default facing with the turn action. I tried to place the second rotation trait before the first, but with the same result.
The next idea I got, was to have a trigger action for the pivoting, that turns the piece in its default facing, THEN pivots it and finally turns it back. But I guess that would be very hard if not impossible to make since you need to know the current facing of the piece and turn it a variable number of times since it has the correct facing.
Thanks for any help to solve this.