Fix for missing Deterministics in psample trace for #522

Also modified test_trace.py to catch this if it comes up again.