I originally suspected git was resetting modification times (and std:fs:track
assumes it monotonically increases), but it looks like git actually always updates the modification time of files it changes when switching branches.
Also, considering it's always link errors (e.g. missing symbols) I'm guessing the relationship with source files and object files is somehow broken when switching branches.