Fix rollback of frozen records

105e0304b9d7eab2f5e570fc23fbc4e1d3f80823 broke rollback of frozen records as shown in #18191