Revert "Use a simplified way to encode versioned keys"

This reverts commit fce6f2ba7c5305fef2bcccfb36a0537535a15445.