Mickelsson's twisted K-theory invariant and its generalizations