Persons proceeded against under sections 588.01 to 588.15 are also liable to indictment for the same misconduct, if it is an indictable offense; but the court before which a conviction is had on the indictment, in passing sentence, shall take into consideration the punishment before inflicted.