Function and inline statement indentation fixes

I don't like to close multiple bugs in a one shot, but these all tie together and overlap.

Fixes #268
Fixes #275
Fixes #276