81b6b91e83
Fixes #27014 r? @alexcrichton I'm not 100% sure there's not a better way to do this, but it works. Also, I wasn't sure how, where, or if to write a test for this.