text: Title: Duplicate test name detection does not take variables into account
  Body: There is a warning is a suite contains multiple tests with the same name, but this duplicate detection doesn't work properly if there are variables in test names. There are two problems:
  
  - There's no warning if names are same after variables are resolved.
  - There is a warning if names are same before variables are resolved but no afterwards.
  
  This is easy to fix by looking for the name from the `result` object, where variables are resolved, instead of the `data` object, that contains the original name. I noticed this when fixing #5292 that has the same root cause. This is less severe but worth fixing anyway.