This was an oversight when layout headings were added. There's now the regular translation context option in the Python API.