Some laws are written in such a way that, eventually, when put to the test and being presented to the Supreme Court, which judges matters of constitutionality, they may indeed be declared void for being unconstitutional. That has never happened for article 287 of the penal code, although it may one day. You'd need an actual case to make that claim, though.
There are no "superiors", except for the constitution.
The law as written doesn't take into account whether the Supreme Court judges are corrupt or politically appointed/influenced. The law spells out what "ought to be", not what "is".