Yes, thanks! I think I've nailed it - normal-mode is calling hack-local-variables right at the start, when it shouldn't. Could you please try out the following patch (which I've also posted for bug #23463):
-- Kaushal Modi