It's a bit cleaner this way since the 2 related things are together. (cherry picked from commit 0826af52)