Switch from LOOKUP() to lookup() for rtm_type (see bug #401 for details).