In MessageV1Codec library id is wrongly decoded to uint64, instead of the original size when being encoded - uint256. The _msg that this function expects is the Message struct that looks like this:
Message.sol
As we can see, the id is of type uint256 but in MessageV1Codec::id its downcasted and will return only the rightmost bits:
MessageV1Codec.sol
Apply the following changes to this function in order to return the original id that the Message struct is encoded with:
