I was using RaycastNonAlloc to see if an object was hit. I looped over the results array to see if the expected object was there. To my surprise, if it was hit on one frame and was inserted into the results array, but then on the next frame was not hit, leaving the total hits to be zero, the results array still contained it!
To workaround I need to check for hits == 0 first, and assume that the object was not hit in that case. This is alright, but the behavior feels like a bug.
This is in 2019.4.18.