Spontaneous transition to quasi-single helicity states in RFX-mod and MST