add a check to prevent skipping checkout steps

Fixes #2764