[generic] Improve SBS detection (Fixes #4899)