fix importing heap from captured env in functions

 - remove heap importing from captured env during function call
add object tests