Test cascade/unset behavior for references

See: #557