readding reverted changes during idmap merge (noticed by Andrew b.)