(#300) - Add id to stored revsisions to ensure uniqueness

Thanks to @neojski for the test and @trokster for the original
implementation of the fix.