calc pub self-refs ahead of time
Merge pull request #2953 from devoncarew/devoncarew_pub_selfref

calc pub self-refs ahead of time