SSP-1899 Add more reference tests

This also makes the reference test common test framework more reliable by handling references with and without code columns