In 1339 Count Reginald II of Guelders became a duke as ordered by Holy Roman Emperor Louis IV of Wittelsbach . In 1339 Count Reginald II of Guelders was elevated to the rank of a duke by Emperor Louis IV of Wittelsbach .