This is an interesting sequence of lines in that this beggar reference seems quite a bit different than the one a few lines earlier.
Previously, the king and the beggar were side by side, two dead people on a table. Now, the king is consumed by a beggar – (presumably via the fish that ate of the worm that ate of the King). They started off as equals and then by the end of this idea, one has consumed the other. So it’s not even that the king is no better than a beggar…it’s that the beggar wins.