Fixed a bug in observables when particle numbers are not contiguous.

Two days ago I sent these changes as a patch in an e-mail to Olaf and Axel. Next day I pulled from the master and realized that they were conflicting with Stefan's changes. Now, the conflict is resolved. Please ignore the original patch, as it will not cleanly apply anymore.