reduce attribute lookup overhead a bit
simplify pop() optimisation utility code
fix accidental double wrap-around of negative indices in pop() optimisation