Add an assertion for doBaseIndex() that will probably trip all over the place.

Also implement some easy forms of storePtr().