To get around all problems with needing to access the dofs directly, I suggest projecting the swapped components. If the spaces are the same, then you should get back the same result (to within the tolerance of the linear solver). Something like this:
W = V*V
f = Function(W)
g = project(as_vector((-f[1], f[0])), W)