Use method instead of class variable

Fixes a caching issue where |'s in searches would get stuck.