Fix #790: Exception templates incorrectly fix information about exception origin