A British Airways flight bound for Germany landed in Scotland by mistake.