Fix python plugin to work with new layer factory in CMake build