Fix zero-size object copy failure

Found via work on #880 . Tests will follow.