Sweden has a sensible solution to this (im sure others do too). When you register a name you specify which part is the
tilltalsnamn (lit. name of adress). In your case, the names would be disambiguated as
Joe Frank Smith and Joe
Frank Smith.
Not all systems use that piece of information, but most do.