Steps to detect this problem:
Step 1: Create new phrase xf_phrase_a and make it to global cache then save.
Step 2: Edit the phrase xf_phrase_a and change id to xf_phrase_a_bug also make new phrase to global cache. Then save. Now you can using both phrases although that phrase xf_phrase_a did not exist