Maximum likelihood localization: When does it fail?