Toggle locked state of selected tabs correctly (#66)