We are experiencing the same issue.
- New Code is set to reference of main branch
- Main branch is set to use previous version
First scan is fine, but after merging the main branch, we get the error on the next scan.
If we delete the branch and scan again, it was successful.