Fix bugs in guard peek into queue for the more complex interleaved cases.
Fixed order of heap handling and assignment for declarations in blocks.
Fix to use the created temp variable in parameter to type constructor.