The diamagnetism of quasi-bound conduction electrons