Fix duplicate deprecations master

This fixes #1151.  I'll be backporting it to 2.99 shortly.

/cc @soulcutter