this probably relates to the fixes from #1530. When trying to execute an if statement or a for loop in the python console, the lines the context is removed, making it impossible to run these type of functions. This affects the top-level functionality in IWP and I think the triggered events.