Fixes #1555

The fix is below all the whitespace patches.