Minor fixes for index bounds checks
Added another extension to this class.  This one tries to reduce the time holding locks by calculating optimisticly before getting the lock.  Only going the slow route once the optimistic calculation is shown to be false.