Fix #4156 - NoMethodError undefined method `stop'

This fixes: https://github.com/rapid7/metasploit-framework/issues/4156

To verify the bug, you can do:

- [x] ```ruby -run -e httpd . -p 8181``` and use this as your fake server
- [x] Start msfconsole
- [x] ```use exploit/multi/http/struts_code_exec```
- [x] ```set rhost [target]```
- [x] ```set lhost [ip]```
- [x] ```set rport 8181```
- [x] ```set PAYLOAD windows/meterpreter/reverse_https```
- [x] ```exploit```
- [x] You should see "NoMethodError undefined method `stop' for nil:NilClass"

And then:

- [x] Apply the patch, repeat the same steps. You should no longer see the error.