If you had the fuel cap installed when you did the fuel flow test, the cap can't be causing the problem. If you didn't have the cap installed, repeat the test. Your problems have been consistent with a fuel cap blockage - it has much the same effect as a floating blockage in the fuel line - but it should have been eliminated from consideration by the flow test.

Is there an idle mixture adjustment on the carburetor? If there is, richen the idle. If that fixes it, it's done. If turning the idle mixture screw toward rich doesn't have any effect, try leaning it off and see if it gets worse. Whenever an engine runs properly except that the idle mixture screw has no effect, you know you have a carburetor malfunction in the idle circuit.