Corrected mainline lock toggle process

Found that toggling the mainline lock was subject to the same latency
errors as earlier found for other types of object updates (local
variable should not be updated by the local function but should instead
wait until a response from server is received to perform the update).