I can see places literally use pe_find_constraint_resource(). How about we wrap them like this.