Also polished DInput code in general to try and mitigate issue 11702. Added a lot of logging and comments.