Fixed Task::setLastErrorMessagesStackSize() not updating the stack size
correctly.