Add check between rules doc and index (fixes #865)