fixed a bug that @InheritPageLayout did not support inheritance hierarchy larger than 1