Fixes #475428 and #475412