Fix regressions affecting compilation

This fixes two regressions, caused by #1167 and #1191 .