T5812: Fix for rollback check max revision number
(cherry picked from commit f019ed91b5444d2f446ca4f7332602c03a074190)