I've done this before, and it usually works (though recently coming back from the US, I tried to remove an FF number on the final segment, but the agent didn't do this properly apparently, despite assurances that it was removed (probably changing is more sure).
[I wanted to remove it as I'm currently not putting a FF number into most *A flights, until I know whether my April renewal will be late enough to ensure LH SEN or not. My other current *A FF is UA, which I'll make 1P on, and might make 1K on if I don't need to credit all my pending flights to BD; as I understand it, I've got 6 months from date of flight to credit to BD, and at least as long for UA. I probably also won't usually fly quite enough to make LH SEN, so I may make UA my primary *G (although it doesn't give lounge access in the US), as most of my long haul is to north america. But I'm also considering AC as that also has attractions for north american runs, with upgrade vouchers at lower levels. I want to wait to see what the new FF programme looks like once UA and CO haver merged. What I don't like about the new UA programme is the co-pay requirement for anything less than B class for TATL upgrades, and B class seems to have got more expensive recently. YMMV.]