Fix a problem in legacy --platform devices detection.