Fix part of lesson synch problem by making taskIndex a property

The remaining synch problem is caused by the fact that we don't synchronize the event handler registry.