The top level is missing in the jpivot table if the user is restricted to access All member by applying the mondrian security role like below:
<HierarchyGrant access="custom" topLevel="[Dim_Customer].[Sales Rep]" bottomLevel="[Dim_Customer].[Customer]" rollupPolicy="partial" hierarchy="Dim_Customer]">
See the patch attached for the fix.