Fix sampling bug in ContinuousVisible, add to regression test