Fixes  #5631: Migrate directive withou change in form work again

i'm failing to grasp the logic of this snippet.
Could you add a comment explaining its intention ?