Make `include` fail gracefully for invalid objects.