moved 'throw' into else clause avoiding exception on every call of cloneStyleFrom, see bugzilla 47054