Fix issues with the conditional discard workarounds to do with assignments.

The old modifiesState method really checked if an operator was an assignment,
so restored that behaviour and use the new side effects detection only for
the new code.

ANGLEBUG=486
BUG=
R=nicolascapens@chromium.org, zmo@chromium.org

Review URL: https://codereview.appspot.com/22130043

Change-Id: I84d4e95a0457e63f237a814d80e4f72dd861496b
diff --git a/src/compiler/translator/ValidateLimitations.cpp b/src/compiler/translator/ValidateLimitations.cpp
index f06a96f..efaf177 100644
--- a/src/compiler/translator/ValidateLimitations.cpp
+++ b/src/compiler/translator/ValidateLimitations.cpp
@@ -461,7 +461,7 @@
 bool ValidateLimitations::validateOperation(TIntermOperator* node,
                                             TIntermNode* operand) {
     // Check if loop index is modified in the loop body.
-    if (!withinLoopBody() || !node->hasSideEffects())
+    if (!withinLoopBody() || !node->isAssignment())
         return true;
 
     const TIntermSymbol* symbol = operand->getAsSymbolNode();