Until a recent MediaWiki change the default behavior of edit section links was to float to the far side of the heading (right on LTR Wikis, assume this case in the following).
This was changed recently but almost all Wikis provide Gadgets to restore the old behavior (see http://en.wikipedia.org/wiki/MediaWiki:Gadget-righteditlinks.css or http://de.wikipedia.org/wiki/MediaWiki:Gadget-editsection-align-end.css for examples)
The problem is, that the VisualEditor's fly-out-links reserve space to the right for the "edit source" link. Therefore when aligning the links right they actually appear with a large distance to the page-margin. The fly-outs should therefore be modified to not reserve any space so the "edit" link is correctly aligned right.
To prevent the fly-outs to shift the whole "edit" link left as soon as they become visible they could be changed to fly-out to the left in this case or to the bottom.