Split end/explode into two statements

Fixes #2434