just in case this helps anyone else who finds this thread, i ran into this same issue when building 'screen' from ports on FreeBSD 11.2 today (i updated both base system and ports tree first). when i changed the TERM environment variable from 'xterm' to 'vt100' or 'screen' before running screen, that did fix the error, but i wasn't happy with that solution, it's another tweak/step that should not be necessary.
after a bit of testing changes to /usr/share/misc/termcap file and still seeing no change in screen's behaviour, i saw a few other people were reporting similar issues with a few other tools (not screen), and it looked to me like the common element was ncurses support.
removing the ncurses port from the system and rebuilding screen using base system copy of ncurses fixed the problem instantly for me, so this solved the issue on systems where i don't need ncurses from ports. i had to remove ncurses port entirely because just using 'make config' on the screen port build and telling it to use base system ncurses did not work while ncurses from ports was still installed/available.