What order were the phones originally paired in? I'm guessing it was set up to pair with the 4, then the 5. The only thing I can suggest, and it may not make any difference at all, is to remove the pairings, and re-pair them. Pair with the 5 first, then the 4.
It's most likely making the connection based on the original order of pairing, or based on the names of the phones (alphabetically), when both are detected at the same time.