speed-up rule application a bit

Bail out early when input set is empty.

Change-Id: Id92790b5a8258733daafe41ee55a4bb3c9d1dd0e
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>