Limit deprecation messages backport

This wasn't passing for me locally, so I hesitate to push this directly. Also, I noticed because of conflicts that #970 may not be in master. Is that important, @JonRowe ?