test case for nested dynamic conditionals with heap state