The initially submitted patch contains a query which are needlessly complicated (import statements).
Attached is a new patch where this has been simplified.