Remove 18 compatibility code as it stopped working a while ago.
Remove defensive programming check for internal API.