This is needed in order for types to work. Note that we currently can't handle dynamically changing rules; we get all rules up front. This will have to do for now though.