R: fix building by tuning the collation order of files