View fixes

There was a problem with automatic view creation when using a Fact which referenced a dimension twice.

An example is a fact which has two columns which reference dim_date (e.g. one representing date the fact was run, and the other something like a booking date).