Shouldn't happen with release versions of FPC. Release versions are compiled with options that avoid automated recompilation (e.g. on a similarly named includefile). If it still happens, it might be an unit with the same name as an RTL unit in your search path, or something else majorly wrong.
If you are trying with 2.7.1, as a former RTL unit, variants is one of the first units that is missing if the compiler can find the RTL, but not packages.