Cast file id's to int so we can compare them properly

Fixes #10397 

cc @schiesbn @DeepDiver1975 @PVince81 
Nope