In cases in which the felony committed is different from that which the offender intended to commit, the following rules shall be observed:
1. If the penalty prescribed for the felony committed be higher than that corresponding to the offense which the accused intended to commit, the penalty corresponding to the latter shall be imposed in its maximum period.
2. If the penalty prescribed for the felony committed be lower than that corresponding to the one which the accused intended to commit, the penalty for the former shall be imposed in its maximum period.
3. The rule established by the next preceding paragraph shall not be applicable if the acts committed by the guilty person shall also constitute an attempt or frustration of another crime, if the law prescribes a higher penalty for either of the latter offenses, in which case the penalty provided for the attempt or the frustrated crime shall be imposed in its maximum period.