Fix index calculation error in function multitask_lasso