Stoddart, Charles, active 1825-1841, Lieutenant-Colonel Royal Staff Corps