what i'll do is try to wipe cache partition and wipe dalvik cache before i flash a new ROM... if it still fails then i will do wipe cache partition and wipe dalvik cache and factory reset before i flash new ROM...
my last resort will be to flash stock ROM then flash custom ROM again...