Pass FunctionRegistry to specialize

This is needed for functions that need to rely on other type-specific functions
(e.g., map comparison, which requires a specific comparator based on the key type)