improve debug information for exception triggered inside internal tag definition