Can we build up a good test suite for this? I have some examples in mind, but it would be good to pinpoint all the places where NA's are not being returned because of undef's.