Fix for tweenMaxSearch not being set correctly

Now the loops that depend on tweenMaxSearch will not go out of the
boundaries when no tweens have been activated yet.