Fix struct autogroup memory leak