You may want to verify that you are looking at the correct file or lines of code. The error message points to this line:
if scene.targetskill.targetgroup == 'enemy' && scene.selectedcharacter.group == self.group:
This line has nothing to do with damage at all. It checks that you haven't selected one of your own party members as the target for a skill that targets the enemy. "group" shows up twice in this line, both being the string member variable of combatants that indicates which group they are apart of.
I have not yet ruled out the possibility of a race condition due to rapid inputs, but it should not be the case that something was skipped due to poor performance.