Revert "Type mismatch when caching SMW IDs"

This reverts commit 306d42726eb1fcef1eb1166a995694082e09b6e5.