Nginx: “Unknown directive […]” after upgrading to Ubuntu 18 LTS

After upgrading vom Ubuntu 16 to 18 LTS I ran into a rather unpleasant and apparently undocumented issue:

The same happened with my WebDAV and fancyindex modules on another server:

The reason why this is happening is that while upgrading Ubuntu my nginx-extras installation got replaced with an installation that includes these