Finally figured it out, I was misusing a scoped enumerator