ensure locals are defined before using them in partials

refs CNVS-15835

Change-Id: I00fe45309eec3cc81a8c3aadab839c3b412f355e
Reviewed-on: https://gerrit.instructure.com/41811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>