Additional changes to #12275 and #12292