This is a fix for two issues with JetPack.
First, it’s a much simpler method of stopping JetPack from sticking itself at the top of the menu under the Dashboard menu.
Secondly, the code JetPack uses to rearrange the menu has bugs, meaning sometimes some menus vanish, e.g. Tools or Settings.
Here’s a gist that you can use as a plugin to fix the issue:
View the code on Gist.