nvi: fix catalog generation
Upstream broke catalog generation with some over-eagre style cleanups.
This brings in my pull request.
Obtained from: https://github.com/lichray/nvi2/pull/88
Differential Revision: https://reviews.freebsd.org/D28594
(cherry picked from commit 888ae5725257c251319f14f31c2e941717b675f2)