I just noticed this patch[1] on the big report which makes a lot more sense.
Miquel, I don't mean to be mean, but the patch attached to this bug came a lot earlier and skipped all our attention. It also reuses some code in main.c which your patch seems to be recomputing.
[1]: https://savannah.gnu.org/bugs/download.php?file_id=29593 -- Thanking You, Darshit Shah
pgpjAjUizsp6A.pgp
Description: PGP signature
