I know this <code>if</code> block is existing code, but it seems like <var>hierarchy</var> might get called before it's made.