Added type to get_enclosing_section

Fixes #33