Fix for several LocalCompiler bugs

The LocalCompiler had bugs in its shadows and obscures logic (see #341). This pull request replaces the `Table` module with a new version that replaces them with simpler algorithms and fixes the bugs.