Fix getting error data from django template.

StringOrigin instances don't have loadname attribute.