It seems like it only works if you make it the first value of the argument array.
Try:
register_post_type('foo', array(
'hierarchical' => true,
'labels' => array(
'name' => 'Foo',
'singular_name' => 'Foo'
),
'description' => 'A Foo',
'public' => true,
'supports' => array(
'title', 'editor', 'author', 'page-attributes'
),
'show_ui' => true,
'menu_position' => 20,
'capability_type' => 'page'
));