Fix error when unknown rule is encountered, also supports flask v0.10.1