Only flatten plain objects