Call BuildIndex() when opening APR IndexContainer for reading
Should help in rare cases where the index is in a bad state like reported in ATLASRECTS-7121 In the second commit I actually moved BuildIndex from open() to the first read.
Edited by Marcin Nowak