Fixes bug reported here: http://askbot.org/en/question/11614/haystacks-real-time-indexing-causes-errors/