Unbreak update_against_templates with goals

It was broken since b3edd98 as post_template_update and post_vc_update
signals no longer have ‘oldstats’ or ‘newstats’ args, so check for their
presence first.