Changes to table close handling

Fix problem in which fake table closes were causing a problem inside
cells. Changed inline table handling to fix this.