https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/post/windows/process.rb 
isn't modified to return the thread handle and just returns true/false.

Will either have to submit that change if you want to use execute_shellcode.