Fixed issue with vector.erase() in GCC

Change-Id: I63467719f8ce30d6b9aa7427dd691329cc49034e