Test for #1039: incremental build is completely broken

Test passes, must have been fixed already