Finite-mass heat reservoirs and the second law