Tentative fixes for rapid7/metasploit-framework#1215

So we can land it.