in ubuntu-helpers solves my immediate problem. Looking at this file, however, it seems that /usr/local needs to be mentioned in other places, specifically under "Allow exec of anything, but under this profile" (for binary directories) and under "Allow exec of libexec applications" (for /usr/local/lib*).
Indeed, changing the line
/{,usr/ }lib{,32, 64}/{,* */}*.so{ ,.*} m,
to
/{,usr/ ,usr/local/ }lib{,32, 64}/{,* */}*.so{ ,.*} m,
in ubuntu-helpers solves my immediate problem. Looking at this file, however, it seems that /usr/local needs to be mentioned in other places, specifically under "Allow exec of anything, but under this profile" (for binary directories) and under "Allow exec of libexec applications" (for /usr/local/lib*).