Resolve "Failed to rebase MR from forked repo"

Merged Valery Sizov requested to merge 3900-fix-rebase_for_forks into master

What does this MR do?

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #3900 (closed)