Bug fix for self modificating vector

Performance improvement (removed searching in map)
Added more asserts