Fixed wrong error being shown with invalid <if> comparisons