Test and fix for #156 - NullPointerException thrown when template includes a comment 

Test case and fix for #156