Probably both of these patches could use some polishing; Austin asked for a test to help debug the crash I found today.