Fix bug #3321 → revert "Remove unreachable code"

This reverts commit 8090f02e4d5c41be4325f0a13d6b0d98ca03684b.
Many thanks to Andreas Rönnquist for the enlightenment!