I found the cause.
In the visibility list, meshes are grouped by pipeline settings. This is all the different rendering settings, plus the shader in use.
The pipeline settings has a < operator for sorting. This is how the grouping is done.
I added a setting in the shader family to force bindless textures off, but did not add any sorting for this in the < operator in the pipeline settings class.
As a result, your sphere was probably getting rendered using the terrain shader.
Once I added the needed fix the problem went away.