Your Yanmar has a mechanical fuel pump which advances the injection timing by using a set of very delicately balanced weights and counterweights. When a small diesel sits for a prolonged period of time there will be paraffin buildups in the fuel pump, since the internals of the pump are lubricated by the fuel it is very important that these buildups be eliminated. There are several additives that will help, one of the best is Lucas Oil Deep Clean Fuel System Cleaner, another is Power Service Clear Diesel Fuel and Tank Cleaner.
You should also consider using a product from either of these companies to treat your fuel and boost the cetane levels in your fuel. ULSD, ultra low sulphur diesel is very "dry" and does not lubricate your fuel system like the fuel that the engine was designed to run would have done. I have used both of these products for many years in diesel engines in heavy equipment, semi tractors, yanmar diesel engines in both boats and in trailer refrigeration units, and in boats and my personal pickup trucks, and they work very well. I would recommend the Lucas oil treatment for engine oil viscosity and their fuel treatment products are great, Power Service is also very good.
What I would do is run the engine out of a gerry can, run at least three gallons of fuel through it at a medium high idle, maybe charge your batteries or something, then treat the tank and run the engine under a load. I would say you would not go wrong doubling or tripling the recommended amount to add to your tank the first time, and then just keep using it every fill up. If this does not correct the problem I would be surprised, but at least you know this is going to be much cheaper than an exploratory engine surgery by a mechanic, and it surely will not hurt. You will want to change the filter to a new filter before treating the fuel system and after, and if you see any mucous like substance in the filter, fuel bowl, lines or elsewhere in the system use the Power Service Bio-Kleen which will kill the microscopic organisms that grow in all fuel tanks, and will eliminate the organisms throughout all the fuel system.
I personally use a combination of the products on anything I buy that has been sitting and I never crank the engine other than to make sure it will run before cleaning the system, and if I bought it without seeing it I clean it before I run it at all. Diesel engines will last a very long time and give you almost no trouble until you get some crappy fuel, then they will drive you nuts. If you have any questions you can PM me.
Lucas Fuel Treatment : Lucas Oil
CLEAR-DIESEL® Fuel & Tank Cleaner: Fuel Polishing Formula ? use to clean and maintain a fuel system.