More robust JSON handling for missing layout and flat top level plugins