So, let me get this straight, the second prince is "tainted" because he's a child of the KING and the KING's concubine and the other guy is the child of the duke, making him a nephew to the king at best, is considered to have "strong" ties to the royal bloodline? The only way he could have as strong or stronger ties to the royal bloodline is if his mother is a very "close" relative as well. In any case I would say that since it seems that the dead king was the one from the royal bloodline then it wouldn't really matter who the mother was, the second prince is the closest blood relative and the rightful heir to the throne after the first prince died.
Then again, I guess this could be one of those medieval "marry within the family to keep the bloodline pure" royalty things, which would mean that the inbred one is the "closest"
genetic blood relative