Fix #2537 (crash on adhoc tab without items)