diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b42421f4a5d2ebbabc7248740ed744e382946cae..e37c40b503fa24ba47d8a4f1db3bbf64fe3747cb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,7 +30,7 @@ Python 3.6 Intel CPU:
 
 Python 3.6 AMD CPU:
   script:
-  - export PY_EXE=python3.5
+  - export PY_EXE=python3.6
   - export PYOPENCL_TEST=amd:pu
   - export EXTRA_INSTALL="numpy mako"
   - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
@@ -42,20 +42,6 @@ Python 3.6 AMD CPU:
   except:
   - tags
 
-Python 2.6 AMD CPU:
-  script:
-  - export PY_EXE=python2.6
-  - export PYOPENCL_TEST=amd:pu
-  - export EXTRA_INSTALL="numpy mako"
-  - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
-  - ". ./build-and-test-py-project.sh"
-  allow_failure: true
-  tags:
-  - python2.6
-  - amd-cl-cpu
-  except:
-  - tags
-
 Python 3.6 Titan X:
   script:
   - export PY_EXE=python3.5
@@ -96,15 +82,29 @@ Python 3.6 AMD GPU:
   except:
   - tags
 
-Python 3.6 POCL:
+Python 2.6 POCL CPU:
   script:
-  - export PY_EXE=python3.6
+  - export PY_EXE=python2.6
   - export PYOPENCL_TEST=portable
   - export EXTRA_INSTALL="numpy mako"
+  - export NO_DOCTESTS=1
   - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
   - ". ./build-and-test-py-project.sh"
   tags:
-  - python3.6
+  - python2.6
+  - amd-cl-cpu
+  except:
+  - tags
+
+Python 2.7 POCL:
+  script:
+  - export PY_EXE=python2.7
+  - export PYOPENCL_TEST=portable
+  - export EXTRA_INSTALL="numpy mako"
+  - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
+  - ". ./build-and-test-py-project.sh"
+  tags:
+  - python2.7
   - pocl
   except:
   - tags
@@ -136,15 +136,15 @@ Python 3.6 POCL CL 1.1:
   except:
   - tags
 
-Python 2.7 POCL:
+Python 3.6 POCL:
   script:
-  - export PY_EXE=python2.7
+  - export PY_EXE=python3.6
   - export PYOPENCL_TEST=portable
   - export EXTRA_INSTALL="numpy mako"
   - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
   - ". ./build-and-test-py-project.sh"
   tags:
-  - python2.7
+  - python3.6
   - pocl
   except:
   - tags
diff --git a/src/c_wrapper/wrap_constants.cpp b/src/c_wrapper/wrap_constants.cpp
index 16b1d1f49ba156f10c5b19b63e36f9915b00b77d..08ed2edea0ca9e28c337127af31d26e819a93631 100644
--- a/src/c_wrapper/wrap_constants.cpp
+++ b/src/c_wrapper/wrap_constants.cpp
@@ -775,10 +775,15 @@ void populate_constants(void(*add)(const char*, const char*, int64_t value))
     // mem_migration_flags_ext
 #ifdef cl_ext_migrate_memobject
     ADD_ATTR("mem_migration_flags_ext", MIGRATE_MEM_OBJECT_, HOST, _EXT);
+
+    // As of 2018-07-11, the official headers seem to have dropped this:
+#ifdef CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED_EXT
     ADD_ATTR("mem_migration_flags_ext", MIGRATE_MEM_OBJECT_,
              CONTENT_UNDEFINED, _EXT);
 #endif
 
+#endif
+
 
     // device_partition_property
 #if PYOPENCL_CL_VERSION >= 0x1020