implement new object safety rules

r? @nikomatsakis 
(That would avoid this being a breaking change.)