[BUGFIX] Wrong image reference handling during flexform copying

References in flexforms having type=inline are not processed correctly
during copy.

Fix this by properly applying the reference field check.

Resolves: #59664
Releases: 6.3, 6.2, 6.1
Change-Id: I1abfa001ba420531ca0c59903e82b1509e0819e0
Reviewed-on: https://review.typo3.org/31426
Reviewed-by: Markus Klein
Tested-by: Markus Klein