It looks like this issue was addressed in linux-kbuild-4.14.12-2: http://metadata.ftp-master.debian.org/changelogs/main/l/linux/linux_4.1 4.12-2_changelog
After upgrading linux-kbuild to the current unstable version (alongside linux-image and linux-headers), the module builds as expected. Sorry for bothering you.