Improved loft_to_grid(). Fixes #37