Setting up recursive task mutex on each key