Implement constant-time nth method for Items #17348

This implementation uses offset directly instead of repeated calls to next in loop.