Compilation fix and added a test for BZ-1067406