bugs.core_4006_test. using a result from a procedure in a substring expression leads to server crash