base-files: fix uid/gid auto-enumeration to avoid 16-bit limit