A judge jailed a witness for legal marijuana use — in the middle of testimony about her abuse