Any person who, knowing that another has been discharged by order of a competent court on a habeas corpus, shall, contrary to the provisions of X of this Act, arrest or detain him or her again for the same cause which was shown on the return to such order, shall forfeit $500 for the first offense, and $1,000 for every subsequent offense.
735 ILCS 5/10-129