Fix thread safety for FunctionRegistry
Fix handling of non-splittable files without blocks