More tests for #6135
Fix tests to work with new primops