fix crash
This loop is obviously wrong, it iterates over size()+1 indices 0..size(), but there are only size().
BUG:378827