Fix a stack trace when module_payloads.rb is run

This fixes a missing check for self.target being nil in the compatible_payloads method
Land #2876 - Fix undefined method `[]' for nil:NilClass in module.rb

[FixRM #8740]