Fixes #5982: In API/rules include/exclude is ordered for target parameter