Fix prelude overriding

Previously `opts.prelude` were not considered when calculating line numbers and
emitting prelude for empty bundles.