BUG: Fix typo-related bug to resolve #9266
closes #9266 

Tried replicating the test case provided in the original issue. Let me know if it needs any changes or fixes.

pls add a note in whatsnew/v0.17.0
 Thanks for the comments — will try to get to these changes tonight PT or early tomorrow PT. 
 so this lgtm. pls squash and ping when green.
 sorry. pls add a release note in whatsnew/0.17.0. refernce the original issue.
 Poops. I messed the `rebase` up badly — I'm gonna close this pull request and open another. Sorry. :/
