[#6] Incorrect code generated for DUAL table

- Added failing test case