Fix loan rule to properly handle ptypes