Correctly associate transfer metadata with transfer on creation

Fixes #6123.