fix TOTAL_STACK usage; fixes #2837