Primitive picking

Fix Primitive picking when appearance is closed and the geometry is on the surface. Fixes #1333.