Fixes and minor enhancements

Fixes an issue raised in the js version that’s also an issue here; not
triggering completion from orthogonal and composite regions under all
circumstances.
Other minor tidying and improvements.