7511 didn't go deep enough.

It fixed this:
```D
struct S(T)
{
    void foo(){} //Inferred 
}
```

but this still doesn't work:
```D
auto foo(T)()
{
    struct S
    {
        void bar(){} //NOT infered.
    }
    return S();
}
```

Which is the case we are in. But even where it fixed, this template depends on a predicate parameter, and is subject to issue 5939: http://d.puremagic.com/issues/show_bug.cgi?id=5939 .

Note that 5939 is "resolved fix", but the conclusion was "voldermort need to be moved *out*", and it was fixed when it was done in std.algorithm. Also, I'm noticing it is declared static. As such, this code will fail to compile:

```D
int x = 2;
int doit(int a){return a/x;}
auto r = [1, 2, 3, 5, 6];
chunkBy!doit(r);
```
```
Error: function main.main.chunkBy!(doit, int[]).chunkBy.Chunk.empty cannot access frame of function D main
```