modify the expansion of WITH-MEMORY-BLOCK-DEVICE-PTR to avoid exponential increase of expanded form.