The previous test seems like a bug to me, so your fix seems correct.