Change the law. In Spain not helping someone that is found helpless and in danger, when you can do so without risk to yourself or others, is a criminal offence.
Such a law would be virtually impossible to enforce in any reasonable way; yes, you can make the odd example of someone, but are you going to spend massive effort on tracking down every passerby on whatever surveillance video might exist should they fail to give aid? If you were said passerby, wouldn't you just get away from the scene all that much more quickly to avoid the greater likelihood of being caught up in the mess?
While I disagree with your thinking, I do have to say you're clearly qualified for politics as this sort of logic drives a significant part of lawmaking... certainly in the U.S. and I suspect in other places around the world as well... maybe even India.