replace dofbranches with doflastsetvalues making handling joints with 360 degrees much more robust to precision errors