Bug fix for Revision.revision_number and improved test coverage