Fix use of undefined vector behavior.

The code was dereferencing an empty vector which is an undefined
operation in C++. VisualStudio 10 specifically checks for out of
range references and throws an exception causing the code to fail
rather harshly.

Change-Id: I81b30dc0886c75e6c7d47ab77b8d8d25f431e59b
Merge topic 'minor_vector_fix' into master

2fc1358c Fix use of undefined vector behavior.