I don't know what your problem might be, but I can explain how the values end up in that table.
when a product page is viewed, the event
catalog_controller_product_view is dispatched.
This event is observed by
This method just instantiates a model and saves record in the table
In the _beforeSave method for the model
Mage_Reports_Model_Product_Index_Viewed the visitor id and customer id are set.
I wasn't able to reproduce your issue, but I thought that the stacktrace may help you debug the issue.