Small change to make the code flow clearer in response to the comments in #4173 (closed).
Closes #4173 (closed)