Tunnelling induced collapse of an atomic Bose–Einstein condensate in a double-well potential