Get around cyclical dependency for SCD management in code repository

I have a requirement to manage SCD for a dataset. When I try to pull the latest snapshot data from the curated layer and trying to write it back to the curated layer (in different pipelines) I am getting errors. Can anyone please help with this.