Thanks for your answer MGSteve!
Well, now I might add another layer of fluff to make it even worse. On my local install I temporarily downgraded to php 5.2.17, and there the 'selected' => (strval($selectedNodeId) === '0'), does work without a problem, where it does not work with the most...