Bugfix - mind your data structures

Rookie error: do not mutate collections you don't own.