I Googled It...
...and this is what I found under one link (http://www.whsyc.org/Headline/Articles/all_about_flags.htm) . Please note the section that refers to raising the Courtesy" flag AFTER the QUARANTINE flag is lowered. It does make sense.The text is as follows:Flying a ‘Courtesy Flag’- Honoring Other National FlagsWhen you operate a boat in a foreign nation, it is important and proper to fly the flag on your boat of the nation you are visiting. You should fly this foreign ensign when you enter and while you operate on its waters. This simple act of respect for the nation you are visiting will gain you much appreciation. Too many US yachtsmen ignore this custom, either out of ignorance or disregard. While cruising to Alaska, we raised the Canadian flag on our starboard spreader after clearing Canadian Customs in Bedwell Harbor. Our slip neighbors, a Canadian couple, were literally choked with pride in their nation to see us take the time to raise their flag in salute to our host nation. Instantly we made a friend, were offered their hospitality and have pictures (they took) to boot. Courtesy flags (small flags of other nations) are available from most marine supply stores and should be purchased before you leave on a trip. Hoist the courtesy flag when the clearance proceedings have been completed and the yellow "Q" flag has been removed. Here are some general guidelines to follow regarding courtesy flags: - On a sailboat, the courtesy flag is flown at the boat's starboard spreader, while the United States ensign stays at the stern. - On a mastless powerboat, the courtesy flag of another nation replaces any flag that is normally flown at the bow of the boat.Although these points serve as protocol in most waters, keep in mind that customs observed in various foreign waters differ from one another; in case of doubt, inquire locally or observe other craft from your country. As a reminder, U.S. vessels while in international or foreign waters must fly the U.S. ensign (50-star flag) rather than yacht ensign. When the starboard spreader is used for the "courtesy flag" of the foreign country, the club burgee, or similar flag may be flown from the port spreader. If the vessel has multiple flag halyards on the starboard spreader, the club burgee is flown there, inboard from the courtesy flag. Don't fly a foreign courtesy ensign after you have returned to U.S. waters.