Reapply the original commit, 0aacd44a, which had a missing brace resulting in an error in compilation. This reverts commit c76b0eb8.