State lawmakers have tried to rein in pharmacy benefit managers, the corporate middlemen frequently blamed for the closures.