Fix NPE in CandidateFactResolver when column name is same as alias name

TestCubeRewriter tests are passing. Added a new test which fails without the change.