Only check for changed flags if Idris is running

This can prevent launching Idris twice when users have non-default
flags.

Fixes #278. Thanks to @jech for the issue report and the fix.