Fix nullptr dereference when autostacking is used.

Authored by johanneszarl on Sep 26 2018, 6:09 PM.