Fix module.run state for non-dict return data

This backports part of a fix for this that is already in the 2014.7
branch, properly handling execution module functions which return
non-dict data.
Merge pull request #16981 from terminalmage/module-run-fix-2014.1

Fix module.run state for non-dict return data