Dmitry Timoshkov : mstask: Avoid an infinite loop.