See https://github.com/rapid7/metasploit-framework/pull/3238/files#r11758276.