Fixes elsif bug

This fixes a bug that has always existed where the AST wouldn't properly account for END_IF when an ELSIF expression existed in the template.