Fix type-holes

This branch fixes the type-holes to infer types in the proper environment (i.e. not just the top-level...).