Change rc_copy_alloc_id to do the cast.

Merged Michael Sammler requested to merge ci/new_copy_aid into master

Merge request reports