Minor refactoring of utl_memoize_* functions