* Fix NPE in execute API (#16722) * Add unit tests with usual and unusual ordering of the parts (#16722)