libctf: Adjust logic to match upstream after 410556f1f
No functional change intended.
Suggested by: jrtc27 MFC after: 1 week