If you were umpiring this game, would you have called it a goal? Is it legal to score this way?

This situation happened during a EHL game between AHTC and Atletic Terrassa. This is a penalty corner for the Spanish team that it finishes with a sliding deflection that takes down a defender. What do you think about it? Was it an offensive foul? Video found at the Field Hockey Ref channel.