Add more context to unification errors internally

All error messages now show a bit more context about where they're from.

Also, function error reflection works again, with greatly simplified code.