added more assertions to check the consistency of replica generation in system and replica_generation tables.

This test makes test_getFunctions() fail.