Say your loan account A is for investment purpose. Then all interest and cost associated with account A is tax deductible.
If you then user account A for personal use, then to the tax office account A has been "contaminated". Deductibility of all interest/cost associated with account A would be subject to a very complex formula.
However if you have account A for investment purpose, and account B is your residential home loan account, both A and B have interest deducting from another account C then that's fine.