Add missing params to get_target_from_rule

get_target_from_rule was extracted from main() without enough parameters for
all the local variables it took with it from the extraction site.
Merge pull request #8174 from altruism/devel

Make ec2_group module not just fail