In 6ddf6358 calculations where moved to the index functions, but spell_length was not treated properly.