Try all names in refine to resolve ambiguity
Fixes #426