Fix #11723 and #11724.