Fuel vaporisation occurs due to the fuel sample reaching its boiling point (it will return back to liquid state as soon as it cools relative to line pressure); this can be determined by using a barometric tester such as a Doc Hodges Fuel Tester... Avgas has very tightly controlled specifications; so the vaporisation temperature/pressure can be predetermined; Mogas to a definitive level cannot... so two variables need to be addressed being 'Line Pressure' and 'Line Temperature'. However the vapor lock issue does not end there.
High carburettor body or float bowl temperatures will result in vapor lock instantly as higher pressurised fuel enters the float bowl, boiling then spirting out through the main and idle jet into the venturi; rough running coughs and spits until temperatures cool down. Hence the use of rubber isolating mounts for the carburettor and at times additional heat shielding plate between manifold and carburettor. V12 jaguars had the aircon system routed around the fuel lines for this reason; it worked.
As stated earlier in this topic the orientation of the upper pump body on a diaphragm pump has no affect on pump operation. Fixings may generally be torqued to a standard specification relevant to a specific thread sizing. However as the modifier you would have to be prepared to accept all responsibility for any subsequent loss or injury resulting from an operational failure.
That being said the threat of vapor lock occurring at any point in the fuel supply system is always present; especially at the float bowl, and the top of the fuel pump body. You can only do so much to prevent it, and it will always be caused by a rise in temperature beyond a certain point relative to pressure (somewhere for Mogas in the vicinity of 75C at 0'AMSL density altitude).
The affect of the return line and restrictor AD on the rotax 912 is to allow fresh fuel to continue flowing through the supply lines at line pressure, at all times, rather than lay somewhat static and suffer heat soak leading to vapor lock. The greater the volume of fuel that can be continually cycled through the lines at required operating pressure the better. Other than proximity to external heat sources and mechanical moving components, how the lines are routed, over or under, is irrelevant.