NB This should be fixed in https://github.com/rapid7/metasploit-framework/pull/2661