Whenever any new district or division is established, or any county or territory is transferred from one district or division to another district or division, prosecutions for offenses committed within such district, division, county, or territory prior to such transfer, shall be commenced and proceeded with the same as if such new district or division had not been created, or such county or territory had not been transferred, unless the court, upon the application of the defendant, shall order the case to be removed to the new district or division for trial.