BUG: Replace a few previously removed exit conditions

A previous commit to remove unreachable break statements was a bit too
aggressive and removed breaks in a few cases where they were still
needed.  This re-creates the correct exit conditions.

Change-Id: I3e44f35c7e36bd73f61473e510bb9f3da2a2106e
Merge topic 'cleanup-pgi-warnings' into master

c9fefb7f BUG: Replace a few previously removed exit conditions