Pass null to chain if ignore-scripts is set, not the config value, to fix property_not_function error