It wasn't merged -- ships in the navy of Nelson would have a sailing master, who was a warrant officer, as well as a captain (a lieutenant, a master and commander or a post-captain) who was a commissioned officer; and usually a captain (breveted to major) of the ship's Marine division. Are you perhaps wondering when commissioned officers began to acquire skills in navigation?
If so these older answers of mine may be helpful: