FELIX-928 Apply patch by Alin Derhiciu (thanks) and factored the actual descriptor reading into a separate method.