Onno actually seems right. I think the previous part of the script seems problematic.
But let me make a lucky guess
JournalEntryItems and JEItemsTemp tables are exactly matched over column names and column count. So qlik sense automatically concatenate two tables. During the execution of "Rename Tables" section, there is no JEItemsTemp in memory. Because it has concatenated to main table which is dropped already So, you should add Noconcatenate above "JEItemsTemp" to force the qlik sense not concatenate the table.
Oops I realized that your group by clause is wrong. You should add all non-aggregated fields to your group by clause