Fixed #18400 -- Unexpected {% if %} behavior

Fixed #18400 -- Unexpected {% if %} behavior
https://code.djangoproject.com/ticket/18400

By using "return 0"