Add tests for wildcard "path vs ref" disambiguation