Repository: TypeScript
Issue: Produce a more complete union of string literal template interpolations when the same const appears multiple times
Labels: Suggestion,Awaiting More Feedback

# Bug Report
When using a constant union of two types, using the value below will always infer it to still be either or both types although as a const it can only be one. 

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
duplicate key union 
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information
Seen in most recent version of TS (4.6.2) and every version available on the playground.
<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is a crash
- This changed between versions ______ and _______
- **This is the behavior in every version I tried, and I reviewed the FAQ for entries about Unions**
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.6.2#code/MYewdgzgLgBA1gUwJ4wLwwOQHMCuDoYwCGEmu+UGAPphAgE4BuAlsAhgNwBQXoksIAEYArNDADeXGNJjlocqAC5MACwQAbdSAwAaKTLpNW+BizbLsIIQBMk7LgF8eQ4QG0ABgBJxiJA+++Du4AukA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
const key = 'guest' as 'guest'| 'service';

const obj = {
    guestguest: 'hello',
    serviceservice: 'goobdye'
}

obj[`${key}${key}`]
```

### 🙁 Actual behavior
Typescript throws error 

`Element implicitly has an 'any' type because expression of type '"guestguest" | "guestservice" | "serviceguest" | "serviceservice"' can't be used to index type '{ guestguest: string; serviceservice: string; }'.
  Property 'guestservice' does not exist on type '{ guestguest: string; serviceservice: string; }'.(7053)`
<!-- What happened, and why it was wrong -->
as this is a const, it is impossible for it to still be an either/or, so multiple instances of the variable should all be equal. 

In this case, only guestguest or serviceservice *should* be possible
### 🙂 Expected behavior
Typescript should correctly infer the key options to be only a combination of one of the options, and not any possible combination. 
<!-- What you expected to happen instead, and why -->