Co-authored-by: Patrick Cloke <patrickc@matrix.org>
Applies the changes from #10665 to additional modules.