Avoid repeated access to the `source_data` when writing the compiled entity clauses to the intermediate Prolog files