Patch #2 works for me, We can use it and make a Drupal 10 release.