See https://github.com/rapid7/metasploit-framework/pull/2541/files#r7061330