The earlier patch should do that by overriding it dynamically,

https://github.com/Ruslaideemin/metasploit-framework/commit/c6b4290fead1929600a6196d24c5069449c61550

shows the earlier patch I did. Should just be able to use that one then, no?