Use a better patch to prevent lossing prepopulated values upon Ajax.

#5326