support underlay devel space when calculating topological order

This is a follow up of #87.

@tfoote @wjwwood Please review.