It's safe to plug your keyboard and mouse into different ports. The 'preferred' ports simply help XIM4 understand cases where it doesn't recognize devices very well. However, it's possible for a mouse to have a virtual keyboard inside, and for a keyboard to have a virtual mouse inside, so your ports are effectively treated the same most of the time.
That said, does it also start working if you switch them back to the ports you had them in to begin with? It may have been the unplugging and re-plugging that worked around the problem, not the actual switching.
If you look above the game box art in XIM Manager, do you see any yellow triangles with lightning bolts over the device icons? See the Power Faults video on the Instructional Videos page linked in my signature for more details.