Fixed spacing in C blocks whose substacks end with terminals

Transfer of #146.
Fixes #129.