LUFACT fixes for sparse complex matrices

Fixes #4523