Elusive GCC swap errors, begone!