Rerolled and updated the patch for v9.4.0 with suggestion from #41