I have found the bug: It turns out that MEM_ALLOC_SIZE is zero if you compile it with debug information (which I did).

```C
/*
 * if -DDEBUG we turn mem_alloc_tiny() to essentially be just a malloc()
 * with additional alignment. The reason for this is it's way easier to
 * trace bugs that way.
 */
#ifdef DEBUG
#undef  MEM_ALLOC_SIZE
#define MEM_ALLOC_SIZE 0
#endif
```

It seems that my patch isn't necessary. Sorry about that.
But maybe you should change the redefinition of MEM_ALLOC_SIZE, so no one else gets burned by that.