Switched to use ThreadLocal in HStoreSite and PrefetchQueryPlanner instead of trying to maintain our own mapping...