Ok, Ubuntu is very specific... The solution, in the block you posted above, is to remove the TAB spacing in front of the comment blocks and everything seems to work as expected.
Because it is a comment block, it does not need to be indented under the if statement.