Properly implement commit 31f0c5c6b9e2a2c41a501234207a8ff41caa2af5 for the SQL output form - fixes incorrect output for actionlist and non-actionlist scripts being printed at the same time