EJS seems to behave differently depending on whether you use { } notation or not:
I have checked and the following condition is evaluated as you would expect:
<%if (3==3) {%> TEXT PRINTED <%}%>
<%if (3==4) {%> TEXT NOT PRINTED <%}%>
while this one doesn't:
<%if (3==3) %> TEXT PRINTED <% %>
<%if (3==4) %> TEXT PRINTED <% %>